Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/ide/src/plugins/help/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<div id='aboutHtml' class="webidaAboutDlgPane">

<div class='webidaAboutLogoPane'>
<img src='styles/images/about_webidalogo.png'
<img src='<%= themePath %>/images/about_webidalogo.png'
alt='webida logo'
class='webidaAboutLogo' />
</div>
Expand Down
28 changes: 19 additions & 9 deletions apps/ide/src/plugins/help/help-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,23 @@ define(['require'], function (require) {
}

function showAbout() {
require(['text!./about.html',
'text!/package.json',
'dojo/i18n!./nls/resource',
'webida-lib/plugins/workbench/plugin',
'webida-lib/util/locale',
'webida-lib/widgets/dialogs/buttoned-dialog/ButtonedDialog'
],
function (aboutHtml, text, i18n, workbench, Locale, ButtonedDialog) {
require([
'text!./about.html',
'text!/package.json',
'dojo/i18n!./nls/resource',
'webida-lib/plugins/workbench/plugin',
'webida-lib/util/locale',
'webida-lib/theme',
'webida-lib/widgets/dialogs/buttoned-dialog/ButtonedDialog'
], function (
aboutHtml,
text,
i18n,
workbench,
Locale,
theme,
ButtonedDialog
) {
var localizer = new Locale(i18n);
var pane = new ButtonedDialog({
buttons: [],
Expand Down Expand Up @@ -81,7 +90,8 @@ define(['require'], function (require) {
commitId: data.buildcommitid || 'Unknown'
};

pane.setContentArea(aboutHtml);

pane.setContentArea(theme.apply(aboutHtml));

$('#version').text(localizer.formatMessage('messageVersion', versionInfo));
$('#buildInfo').html(
Expand Down
2 changes: 1 addition & 1 deletion apps/ide/src/plugins/webida.preference/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"keys" : { "default" : "Alt + P" }, "desc" : "Workspace Preferences"
},
"toolbar": {
"icons" : "./styles/theme/webida-light/images/icons/toolbar_preference.png",
"icons" : "<%= themePath %>/images/icons/toolbar_preference.png",
"tooltip" : "Preferences",
"enabledOn": "toolbar.preferences.enable",
"disabledOn": "toolbar.preferences.disable"
Expand Down
4 changes: 4 additions & 0 deletions common/src/webida/app-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ define([
dir: '.project',
file: 'project.json'
}
},
theme: {
name: 'webida-light',
basePath: serverConf.systemApps[APP_ID].baseUrl + '/apps/ide/src/styles/theme/webida-light'
}
};
});
102 changes: 52 additions & 50 deletions common/src/webida/plugins/workbench/command-system/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,55 +24,57 @@
* toolbar.js
*/

define(['webida-lib/plugin-manager-0.1', // pm
'external/lodash/lodash.min', // _
'./MenuItemTree', // MenuItemTree
'dojo', // dojo
'dojo/on', // on
'dojo/dom-style', // domStyle
'dojo/dom-class', // domClass
'dojo/dom-attr', // domAttr
'dojo/html', // html
'dojo/query', // query
'dojo/aspect', // aspect
'dojo/topic', // topic
'dojo/Deferred', // Deferred
'dojo/_base/lang', // lang
'dijit/Toolbar', // Toolbar
'dijit/form/Button', // Button
'dijit/form/DropDownButton', // DropDownButton
'dijit/form/ComboButton', // ComboButton
'dijit/Menu', // Menu
'dijit/DropDownMenu', // DropDownMenu
'dijit/MenuItem', // MenuItem
'dijit/MenuSeparator', // MenuSeparator
'dijit/ToolbarSeparator', // ToolbarSeparator
],
function (pm,
_,
MenuItemTree,
dojo,
on,
domStyle,
domClass,
domAttr,
html,
query,
aspect,
topic,
Deferred,
lang,
Toolbar,
Button,
DropDownButton,
ComboButton,
Menu,
DropDownMenu,
MenuItem,
MenuSeparator,
ToolbarSeparator
)
{
define([
'external/lodash/lodash.min', // _
'dojo', // dojo
'dojo/on', // on
'dojo/dom-style', // domStyle
'dojo/dom-class', // domClass
'dojo/dom-attr', // domAttr
'dojo/html', // html
'dojo/query', // query
'dojo/aspect', // aspect
'dojo/topic', // topic
'dojo/Deferred', // Deferred
'dojo/_base/lang', // lang
'dijit/Toolbar', // Toolbar
'dijit/form/Button', // Button
'dijit/form/DropDownButton', // DropDownButton
'dijit/form/ComboButton', // ComboButton
'dijit/Menu', // Menu
'dijit/DropDownMenu', // DropDownMenu
'dijit/MenuItem', // MenuItem
'dijit/MenuSeparator', // MenuSeparator
'dijit/ToolbarSeparator', // ToolbarSeparator
'webida-lib/plugin-manager-0.1', // pm
'webida-lib/theme', // theme
'./MenuItemTree' // MenuItemTree
], function (
_,
dojo,
on,
domStyle,
domClass,
domAttr,
html,
query,
aspect,
topic,
Deferred,
lang,
Toolbar,
Button,
DropDownButton,
ComboButton,
Menu,
DropDownMenu,
MenuItem,
MenuSeparator,
ToolbarSeparator,
pm,
theme,
MenuItemTree
) {
'use strict';
//console.log('mira: toolbar module loaded...');

Expand Down Expand Up @@ -101,7 +103,7 @@ function (pm,
var modifiedIconClass = menuitem.replace(/&/g, '').replace(/\//g, '__').replace(/ /g, '_') + '_wticons';
img = '<style type="text/css">' +
'.' + modifiedIconClass + ' {' +
'background-image: url("' + iconNormal + '");' +
'background-image: url("' + theme.apply(iconNormal) + '");' +
'}' +
'</style>';
imgClass = modifiedIconClass;
Expand Down
38 changes: 38 additions & 0 deletions common/src/webida/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2012-2015 S-Core Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
*
* @since: 15. 11. 24
* @author: Koong Kyungmi (kyungmi.k@samsung.com)
*/

define([
'external/lodash/lodash.min',
'webida-lib/app-config'
], function (
_,
config
) {
'use strict';
var theme = config.theme;

return {
apply: function (template) {
return _.template(template)({theme: theme.name, themePath: theme.basePath});
}
};
});