add icons

This commit is contained in:
keyeqing 2013-11-06 21:06:11 +08:00
parent c1c36d0eb7
commit e25ec07959
1 changed files with 144 additions and 14 deletions

View File

@ -1188,6 +1188,21 @@ HAFlow.Main.prototype.initToolbar = function() {
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconSave"
});
this.toolbar.openFlowButton = new dijit.form.Button({
id : "toolbar_openFlow",
label : "Open Flow",
showLabel : false,
iconClass : "dijitIconFolderOpen",
disabled:"disabled"
});
this.toolbar.closeFlowButton = new dijit.form.Button({
id : "toolbar_closeFlow",
label : "Close Flow",
showLabel : false,
iconClass : "dijitIconFolderClosed",
disabled:"disabled"
});
this.toolbar.removeFlowButton = new dijit.form.Button({
id : "toolbar_removeFlow",
label : "Remove Flow",
@ -1195,35 +1210,118 @@ HAFlow.Main.prototype.initToolbar = function() {
iconClass : "dijitEditorIcon dijitEditorIconDelete",
disabled:"disabled"
});
this.toolbar.sepButton_1 = new dijit.form.Button({
id : "toolbar_Sep_1",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconSep",
});
this.toolbar.runFlowButton = new dijit.form.Button({
id : "toolbar_runFlow",
label : "Run Flow",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconTabIndent"
});
this.toolbar.sepButton_2 = new dijit.form.Button({
id : "toolbar_Sep_2",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconSep",
});
this.toolbar.searchButton = new dijit.form.Button({
id : "toolbar_search",
label : "Search Flow",
showLabel : false,
iconClass : "dijitIconSearch",
disabled:"disabled"
});
this.toolbar.sepButton_3 = new dijit.form.Button({
id : "toolbar_Sep_3",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconSep",
});
this.toolbar.hideToolbarButton = new dijit.form.Button({
id : "toolbar_hidetoolbar",
label : "Hide Toolbar",
showLabel : false,
iconClass : "dijitIconClear",
disabled:"disabled"
});
this.toolbar.sepButton_4 = new dijit.form.Button({
id : "toolbar_Sep_4",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconSep",
});
this.toolbar.manual = new dijit.form.Button({
id : "toolbar_manual",
label : "Manual",
showLabel : false,
iconClass : "dijitIconBookmark",
disabled:"disabled"
});
this.toolbar.sepButton_5 = new dijit.form.Button({
id : "toolbar_Sep_5",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconSep",
});
this.toolbar.openOozieButton = new dijit.form.Button({
id : "toolbar_openOozie",
label : "open Oozie",
iconClass : "dijitIconFolderOpen"
});
this.toolbar.closeOozieButton = new dijit.form.Button({
id : "toolbar_closeOozie",
label : "Close Oozie",
iconClass : "dijitIconFolderClosed",
disabled:"disabled"
});
this.toolbar.sepButton_6 = new dijit.form.Button({
id : "toolbar_Sep_6",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconSep",
});
this.toolbar.openHiveButton = new dijit.form.Button({
id : "toolbar_openHive",
label : "open Hive",
iconClass : "dijitIconFolderOpen"
});
this.toolbar.closeHiveButton = new dijit.form.Button({
id : "toolbar_closeHive",
label : "Close Hive",
iconClass : "dijitIconFolderClosed",
disabled:"disabled"
});
this.toolbar.sepButton_7 = new dijit.form.Button({
id : "toolbar_Sep_7",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconSep",
});
this.toolbar.copyFlowButton = new dijit.form.Button({
id : "toolbar_copyFlow",
label : "Copy Flow",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconCopy"
iconClass : "dijitEditorIcon dijitEditorIconCopy",
disabled:"disabled"
});
this.toolbar.pasteFlowButton = new dijit.form.Button({
id : "toolbar_pasteFlow",
label : "Paste Flow",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconPaste"
iconClass : "dijitEditorIcon dijitEditorIconPaste",
disabled:"disabled"
});
this.toolbar.undoFlowButton = new dijit.form.Button({
id : "toolbar_Undo",
label : "Undo",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconUndo"
iconClass : "dijitEditorIcon dijitEditorIconUndo",
disabled:"disabled"
});
this.toolbar.redoFlowButton = new dijit.form.Button({
id : "toolbar_Redo",
label : "Redo",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconRedo"
iconClass : "dijitEditorIcon dijitEditorIconRedo",
disabled:"disabled"
});
// this.toolbar.BackColorFlowButton = new dijit.form.Button({
// id : "BackColor",
@ -1235,31 +1333,57 @@ HAFlow.Main.prototype.initToolbar = function() {
id : "Bold",
label : "Bold",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconBold"
iconClass : "dijitEditorIcon dijitEditorIconBold",
disabled:"disabled"
});
this.toolbar.CancelFlowButton = new dijit.form.Button({
id : "Cancel",
label : "Cancel",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconCancel"
iconClass : "dijitEditorIcon dijitEditorIconCancel",
disabled:"disabled"
});
this.toolbar.InsertImageFlowButton = new dijit.form.Button({
id : "InsertImage",
label : "InsertImage",
showLabel : false,
iconClass : "dijitEditorIcon dijitEditorIconInsertImage"
iconClass : "dijitEditorIcon dijitEditorIconInsertImage",
disabled:"disabled"
});
this.toolbar.toolbar.addChild(this.toolbar.newFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.saveFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.removeFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.runFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.openFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.closeFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.copyFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.pasteFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.removeFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.sepButton_1);
this.toolbar.toolbar.addChild(this.toolbar.runFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.sepButton_2);
this.toolbar.toolbar.addChild(this.toolbar.searchButton);
this.toolbar.toolbar.addChild(this.toolbar.sepButton_3);
this.toolbar.toolbar.addChild(this.toolbar.hideToolbarButton);
this.toolbar.toolbar.addChild(this.toolbar.sepButton_4);
this.toolbar.toolbar.addChild(this.toolbar.manual);
this.toolbar.toolbar.addChild(this.toolbar.sepButton_5);
this.toolbar.toolbar.addChild(this.toolbar.openOozieButton);
this.toolbar.toolbar.addChild(this.toolbar.closeOozieButton);
this.toolbar.toolbar.addChild(this.toolbar.sepButton_6);
this.toolbar.toolbar.addChild(this.toolbar.openHiveButton);
this.toolbar.toolbar.addChild(this.toolbar.closeHiveButton);
this.toolbar.toolbar.addChild(this.toolbar.sepButton_7);
this.toolbar.toolbar.addChild(this.toolbar.undoFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.redoFlowButton);
// this.toolbar.toolbar.addChild(this.toolbar.BlackColorFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.BoldFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.CancelFlowButton);
this.toolbar.toolbar.addChild(this.toolbar.InsertImageFlowButton);
@ -1278,6 +1402,12 @@ HAFlow.Main.prototype.initToolbar = function() {
dojo.connect(this.toolbar.runFlowButton, "onClick", function(event) {
_currentInstance.runFlow(_currentInstance.currentFlowId);
});
dojo.connect(this.toolbar.openOozieButton, "onClick", function(event) {
_currentInstance.openoozie();
});
dojo.connect(this.toolbar.openHiveButton, "onClick", function(event) {
_currentInstance.openhive();
});
this.ui.mainMenu.addChild(this.toolbar.toolbar);
};
@ -1497,7 +1627,7 @@ HAFlow.Main.prototype.initFlowMenu = function() {
this.ui.mainMenu.addChild(new dijit.layout.ContentPane({
id : "tipContentPane",
title : "tip",
content : "|&nbsp&nbsp<a href=quit><font size=2px>quit</font></a>",
content : "<div style='margin:-3px'>|&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<a href=quit style='text-decoration: none;'><font size=2px>quit</font></a></div>",
style : "float:right;"
}));
@ -1513,16 +1643,16 @@ HAFlow.Main.prototype.initFlowMenu = function() {
this.ui.mainMenu.addChild(new dijit.PopupMenuBarItem({
id : "usernameContentPane",
label : "<a href><font color=red size=2px>" + username + "</font></a>",
label : "<font size=2px>" + username + "</font>",
style : "float:right;",
popup : this.menu.userMenu
}));
this.ui.mainMenu.addChild(new dijit.layout.ContentPane({
/*this.ui.mainMenu.addChild(new dijit.layout.ContentPane({
id : "welcomeContentPane",
title : "welcome",
content : "<font size=2px align=top>Welcome,</font>",
style : "float:right;"
}));
}));*/
var _currentInstance = this;