forked from play-co/timestep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from gameclosure/feature-support-links
Feature support links
- Loading branch information
Showing
11 changed files
with
158 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
"version": "0.1.0", | ||
"author": "Game Closure", | ||
"name": "About", | ||
"scope": "main" | ||
"scope": "footer" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,24 +45,24 @@ var VersionCell = Class(squill.Cell, function(supr) { | |
}); | ||
|
||
this.render = function() { | ||
this.label.setText(this._data.toString()); | ||
this.label.setText(this._data.version.toString()); | ||
|
||
if (this._data == currentVersion) { | ||
if (this._data.version == currentVersion) { | ||
$.addClass(this._el, 'current'); | ||
} else { | ||
$.removeClass(this._el, 'current'); | ||
} | ||
}; | ||
}); | ||
|
||
var versionData = new squill.models.DataSource({key: 'src'}); | ||
var versionData = new squill.models.DataSource({key: 'src', sorter: function (v) { return Version.sorterKey(v.version); }}); | ||
|
||
exports = Class(sdkPlugin.SDKPlugin, function(supr) { | ||
this._def = { | ||
id: 'aboutPane', | ||
children: [ | ||
{className: 'topTabs', type: squill.TabbedPane, panes: [ | ||
{id: 'aboutMain', className: 'mainPanel', title: 'about', children: [ | ||
{id: 'aboutMain', className: 'mainPanel', title: 'about', children: [ | ||
{className: 'table-wrapper', children: [ | ||
{className: 'table', children: [ | ||
{className: 'table-row', children: [ | ||
{className: 'table-cell', children: [ | ||
|
@@ -72,23 +72,18 @@ exports = Class(sdkPlugin.SDKPlugin, function(supr) { | |
{id: 'updateStatus'}, | ||
{id: 'lastCheckedStatus'}, | ||
{id: 'refresh', type: 'button', text: '\u21BB', className: 'circle'} | ||
]} | ||
]}, | ||
{id: 'btnSwitchVersion', type: 'button', text: 'switch version'} | ||
]} | ||
]}, | ||
]}, | ||
]}, | ||
|
||
{ | ||
className: 'support mainPanel', | ||
title: 'support', | ||
id: 'support' | ||
}, | ||
|
||
{className: 'mainPanel', title: 'versions', children: [ | ||
{id: 'versionHeader', children: [{tag: 'span', text: 'current version: '}, {tag: 'span', id: 'aboutVersion'}]}, | ||
{id: 'versionWrapper', className: 'darkPanel', children: [ | ||
|
||
{id: 'versionWrapper', children: [ | ||
{id: 'versionHeader', text: 'all versions:'}, // children: [{tag: 'span', text: 'all versions: '}, {tag: 'span', id: 'aboutVersion'}]}, | ||
{id: 'versionListWrapper', className: 'darkPanel', children: [ | ||
{id: 'versions', type: 'list', dataSource: versionData, cellCtor: VersionCell, selectable: 'single'} | ||
]}, | ||
]} | ||
]} | ||
]} | ||
] | ||
|
@@ -103,10 +98,14 @@ exports = Class(sdkPlugin.SDKPlugin, function(supr) { | |
type: 'json' | ||
}, bind(this, 'onVersions')); | ||
}; | ||
|
||
on.btnSwitchVersion = function () { | ||
$.addClass(this._el, 'showVersions'); | ||
this.versions.needsRender(); | ||
} | ||
}); | ||
|
||
this.onSwitchVersion = function(version) { | ||
this.hideMore(); | ||
$.setText(this.lastCheckedStatus, 'Updating... Please wait.'); | ||
util.ajax.get({ | ||
url: '/plugins/about/update/', | ||
|
@@ -127,14 +126,6 @@ exports = Class(sdkPlugin.SDKPlugin, function(supr) { | |
|
||
this.getVersions(); | ||
this.versions.subscribe('Switch', this, 'onSwitchVersion'); | ||
|
||
this.support._el.innerHTML = '<ul class="support">\ | ||
<li><a href="http://docs.gameclosure.com">Documentation</a></li>\ | ||
<li><a href="https://gcsdk.zendesk.com/forums">Forum</a></li>\ | ||
<li><a href="">Mailing List</a></li>\ | ||
<li><a href="http://webchat.freenode.net/?channels=#gameclosure">IRC</a></li>\ | ||
<li><a href="mailto:[email protected]">[email protected]</a></li>\ | ||
</ul>'; | ||
}; | ||
|
||
this.getVersions = function() { | ||
|
@@ -148,6 +139,7 @@ exports = Class(sdkPlugin.SDKPlugin, function(supr) { | |
if (!response) { | ||
return; | ||
} | ||
|
||
var lastChecked = response.info ? response.info.lastChecked : -1; | ||
if (lastChecked == -1) { | ||
$.setText(this.lastCheckedStatus, 'checking for updates...'); | ||
|
@@ -169,7 +161,10 @@ exports = Class(sdkPlugin.SDKPlugin, function(supr) { | |
currentVersion = v; | ||
} | ||
|
||
versionData.add(v); | ||
versionData.add({ | ||
version: v, | ||
src: v.src | ||
}); | ||
} | ||
|
||
versionData.sort(Version.sorterDesc); | ||
|
@@ -186,8 +181,7 @@ exports = Class(sdkPlugin.SDKPlugin, function(supr) { | |
} | ||
|
||
$.setText(this.version, verStr); | ||
$.setText(this.aboutVersion, verStr); | ||
|
||
|
||
this._checkUpdates(); | ||
}; | ||
|
||
|
@@ -199,9 +193,9 @@ exports = Class(sdkPlugin.SDKPlugin, function(supr) { | |
var nextVersion = null; | ||
|
||
// find the first non-beta version greater than the current version | ||
versionData.forEach(function(v) { | ||
if (currentVersion.lt(v)) { | ||
nextVersion = v; | ||
versionData.forEach(function(data) { | ||
if (currentVersion.lt(data.version)) { | ||
nextVersion = data.version; | ||
return true; | ||
} | ||
}, this); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"version": "0.1.0", | ||
"author": "Game Closure", | ||
"name": "Documentation", | ||
"scope": "footer" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* @license | ||
* This file is part of the Game Closure SDK. | ||
* | ||
* The Game Closure SDK is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* The Game Closure SDK is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with the Game Closure SDK. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
exports.load = function (app) { | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* @license | ||
* This file is part of the Game Closure SDK. | ||
* | ||
* The Game Closure SDK is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* The Game Closure SDK is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with the Game Closure SDK. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import ....sdkPlugin; | ||
import shared.Version as Version; | ||
import util.ajax; | ||
import string.timeAgo; | ||
|
||
import squill.TabbedPane; | ||
import squill.Delegate; | ||
import squill.models.DataSource; | ||
import squill.Cell; | ||
|
||
from util.browser import $; | ||
|
||
exports = Class(sdkPlugin.SDKPlugin, function(supr) { | ||
this._def = { | ||
id: 'aboutPane', | ||
style: {overflow: 'hidden'}, | ||
children: [ | ||
{tag: 'iframe', src: '//docs.gameclosure.com', style: {border: 0, width: '100%', height: '100%'}} | ||
] | ||
}; | ||
|
||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
"version": "0.2.0", | ||
"author": "Game Closure", | ||
"name": "Remote Debug", | ||
"scope": "inspectors" | ||
"scope": "debug" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
"version": "0.1.0", | ||
"author": "Game Closure", | ||
"name": "Projects", | ||
"scope": "main" | ||
"scope": "header" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters