Skip to content

Commit

Permalink
Merge pull request #1322 from ajaxorg/fix_duplicate_action
Browse files Browse the repository at this point in the history
Fix duplicate action
  • Loading branch information
linh81 committed Apr 19, 2012
2 parents decbd33 + 6b47a35 commit 2d8034f
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 35 deletions.
6 changes: 3 additions & 3 deletions client/ext/code/code.xml
Expand Up @@ -29,7 +29,7 @@

contextmenu = "mnuCtxEditor"
debugger = "{this.syntax == 'javascript' ? dbg : null}"
readonly = "{[@loading] or cloud9config.readonly or (location.host and window.stDebugProcessRunning and stDebugProcessRunning.active and [@scriptid])}"
readonly = "{[@loading] || cloud9config.readonly || (location.host && window.stDebugProcessRunning and stDebugProcessRunning.active && [@scriptid])}"
/>

<a:menu id="mnuCtxEditor" render="runtime" onfocus="require('ext/clipboard/clipboard').keepRange()" ondisplay="require('ext/clipboard/clipboard').showRange()">
Expand All @@ -41,11 +41,11 @@
<a:item onclick="{require('ext/clipboard/clipboard').paste()}">Paste</a:item>
<a:divider />
<a:item
visible="{stDebugProcessRunning.active and !stRunning.active}"
visible="{stDebugProcessRunning.active &amp;&amp; !stRunning.active}"
onclick="
require('ext/quickwatch/quickwatch').toggleDialog(1, true);
">Quick Watch</a:item>
<a:divider visible="{stDebugProcessRunning.active and !stRunning.active}" />
<a:divider visible="{stDebugProcessRunning.active &amp;&amp; !stRunning.active}" />
<a:item onclick="ceEditor.$editor.getSelection().selectAll()">Select All</a:item>
</a:menu>

Expand Down
20 changes: 10 additions & 10 deletions client/ext/debugger/debugger.xml
Expand Up @@ -7,28 +7,28 @@
icon = "play.png"
onclick = "dbg.continueScript();"
skin = "c9-sidepanelsbutton"
disabled = "{!stDebugProcessRunning.active or stRunning.active}" />
disabled = "{!stDebugProcessRunning.active || stRunning.active}" />
<a:button tooltip="Suspend"
skin = "c9-sidepanelsbutton"
icon = "pause.png"
onclick = "dbg.suspend();"
disabled = "{!stDebugProcessRunning.active or !stRunning.active}"/>
disabled = "{!stDebugProcessRunning.active || !stRunning.active}"/>
<a:divider skin="c9-divider" />
<a:button id="btnStepOver" tooltip="Step Over"
icon = "step.png"
skin = "c9-sidepanelsbutton"
onclick = "dbg.stepNext();"
disabled = "{!stDebugProcessRunning.active or stRunning.active}" />
disabled = "{!stDebugProcessRunning.active || stRunning.active}" />
<a:button id="btnStepInto" tooltip="Step Into"
icon = "stepinto.png"
skin = "c9-sidepanelsbutton"
onclick = "dbg.stepInto();"
disabled = "{!stDebugProcessRunning.active or stRunning.active}" />
disabled = "{!stDebugProcessRunning.active || stRunning.active}" />
<a:button id="btnStepOut" tooltip="Step Out"
icon = "stepback.png"
skin = "c9-sidepanelsbutton"
onclick = "dbg.stepOut();"
disabled = "{!stDebugProcessRunning.active or stRunning.active}" />
disabled = "{!stDebugProcessRunning.active || stRunning.active}" />
</a:hbox>
</a:page>
</a:tab>
Expand All @@ -43,7 +43,7 @@
model = "mdlDbgStack"
class = "noscrollbar"
scrollbar = "sbShared 20 2 2"
disabled = "{!stDebugProcessRunning.active or stRunning.active}"
disabled = "{!stDebugProcessRunning.active || stRunning.active}"
selected = "{dbg.activeframe}">
<a:actions />
<a:each match="[frame]">
Expand All @@ -59,7 +59,7 @@
<a:toolbar>
<a:bar border="0 0 1 0">
<a:button
disabled = "{!stDebugProcessRunning.active or stRunning.active}"
disabled = "{!stDebugProcessRunning.active || stRunning.active}"
caption = "Execute"
tooltip = "Ctrl+Enter"
onclick = "
Expand All @@ -78,7 +78,7 @@
width = "120"
maxitems = "10"
model = "mdlDbgSources"
disabled = "{!stDebugProcessRunning.active and 1}"
disabled = "{!stDebugProcessRunning.active &amp;&amp; 1}"
each = "[file]"
caption = "[@text]"
autoselect = "false"
Expand All @@ -87,7 +87,7 @@
</a:toolbar>
<a:codeeditor id="txtCode"
flex = "1"
disabled = "{stRunning.active or !stDebugProcessRunning.active}"
disabled = "{stRunning.active || !stDebugProcessRunning.active}"
onkeydown = "return require('ext/debugger/inspector').consoleTextHandler(event)"
realtime = "true"
border = "0"
Expand All @@ -114,7 +114,7 @@
prerender = "false"
caching = "false"
model = "[{dbg.activeframe}::vars]"
disabled = "{!stDebugProcessRunning.active or stRunning.active}"
disabled = "{!stDebugProcessRunning.active || stRunning.active}"
loading-message = "Calculating...">
<a:actions />
<a:each match="[item|globals]" sort="[@name]">
Expand Down
4 changes: 2 additions & 2 deletions client/ext/quickwatch/quickwatch.xml
Expand Up @@ -15,7 +15,7 @@
skin = "tbempty"
margin = "5"
realtime = "true"
disabled = "{!stDebugProcessRunning.active or stRunning.active}"
disabled = "{!stDebugProcessRunning.active || stRunning.active}"
initial-message = "Enter an expression"
focusselect = "true"
onclear = "
Expand All @@ -30,7 +30,7 @@
scrollbar = "sbShared 20 2 2"
prerender = "false"
caching = "false"
disabled = "{!stDebugProcessRunning.active or stRunning.active}"
disabled = "{!stDebugProcessRunning.active || stRunning.active}"
empty-message = "Type a javascript expression and press enter."
loading-message = "Calculating..."
onafterselect = "
Expand Down
2 changes: 1 addition & 1 deletion client/ext/revisions/revisions.xml
Expand Up @@ -60,7 +60,7 @@
}
</ul>
{
if ([@loading_preview] == 'true' or [@loading] == 'true') {
if ([@loading_preview] == 'true' || [@loading] == 'true') {
<button class="btnRecover" disabled="disabled"></button>
}
else {
Expand Down
16 changes: 8 additions & 8 deletions client/ext/run/run.xml
Expand Up @@ -23,33 +23,33 @@
icon = "stop.png"
skin = "c9-sidepanelsbutton"
onclick = "require('ext/run/run').stop()"
disabled = "{!stProcessRunning.active and 1}" />-->
disabled = "{!stProcessRunning.active &amp;&amp; 1}" />-->
<a:button id="btnResume" tooltip="Resume"
icon = "play.png"
onclick = "dbg.continueScript();"
skin = "c9-sidepanelsbutton"
disabled = "{!stDebugProcessRunning.active or stRunning.active}" />
disabled = "{!stDebugProcessRunning.active || stRunning.active}" />
<a:button tooltip="Suspend"
skin = "c9-sidepanelsbutton"
icon = "pause.png"
onclick = "dbg.suspend();"
disabled = "{!stDebugProcessRunning.active or !stRunning.active}"/>
disabled = "{!stDebugProcessRunning.active || !stRunning.active}"/>
<a:divider skin="c9-divider" />
<a:button id="btnStepInto" tooltip="Step Into"
icon = "stepinto.png"
skin = "c9-sidepanelsbutton"
onclick = "dbg.stepInto();"
disabled = "{!stDebugProcessRunning.active or stRunning.active}" />
disabled = "{!stDebugProcessRunning.active || stRunning.active}" />
<a:button id="btnStepOver" tooltip="Step Over"
icon = "step.png"
skin = "c9-sidepanelsbutton"
onclick = "dbg.stepNext();"
disabled = "{!stDebugProcessRunning.active or stRunning.active}" />
disabled = "{!stDebugProcessRunning.active || stRunning.active}" />
<a:button id="btnStepOut" tooltip="Step Out"
icon = "stepback.png"
skin = "c9-sidepanelsbutton"
onclick = "dbg.stepOut();"
disabled = "{!stDebugProcessRunning.active or stRunning.active}" />
disabled = "{!stDebugProcessRunning.active || stRunning.active}" />
<a:divider skin="c9-divider" class="runcommandsdivider" />
</a:hbox>
</a:page>
Expand Down Expand Up @@ -140,14 +140,14 @@
icon = "run.png"
caption = "run"
onclick = "require('ext/run/run').run(false)"
disabled = "{stProcessRunning.active and 1}"
disabled = "{stProcessRunning.active &amp;&amp; 1}"
submenu = "mnuRunCfg" />
<a:button
icon = "stop.png"
caption = "stop"
skin = "c9-toolbarbutton"
onclick = "require('ext/run/run').stop()"
disabled = "{!stProcessRunning.active and 1}" /-->
disabled = "{!stProcessRunning.active &amp;&amp; 1}" /-->
</a:bar>

</a:application>
4 changes: 2 additions & 2 deletions client/ext/runpanel/runbuttons.xml
Expand Up @@ -27,7 +27,7 @@
icon = "{itmDebug.checked ? 'run.png' : 'run.png'}"
caption = "{itmDebug.checked ? 'debug' : 'run'}"
onclick = "require('ext/runpanel/runpanel').run()"
visible = "{!stProcessRunning.active and 1}"
visible = "{!stProcessRunning.active &amp;&amp; 1}"
tooltip = "{itmDebug.checked ? 'Debug' : 'Run'}"
disabled = "{!ide.onLine}"
submenu = "mnuRunCfg" />
Expand All @@ -38,7 +38,7 @@
tooltip = "Stop"
skin = "c9-toolbarbutton"
onclick = "require('ext/runpanel/runpanel').stop()"
visible = "{stProcessRunning.active and 1}"
visible = "{stProcessRunning.active &amp;&amp; 1}"
disabled = "{!ide.onLine}" />
</a:bar>

Expand Down
8 changes: 4 additions & 4 deletions client/ext/runpanel/runpanel.xml
Expand Up @@ -27,15 +27,15 @@
icon = "{itmDebug.checked ? 'bug.png' : 'run.png'}"
caption = "{itmDebug.checked ? 'debug' : 'run'}"
onclick = "require('ext/runpanel/runpanel').run(itmDebug.checked)"
visible = "{!stProcessRunning.active and 1}"
visible = "{!stProcessRunning.active &amp;&amp; 1}"
skin = "c9-toolbarbutton"
submenu = "mnuRunCfg" />
<a:button
icon = "stop.png"
caption = "stop"
skin = "c9-toolbarbutton"
onclick = "require('ext/runpanel/runpanel').stop()"
visible = "{stProcessRunning.active and 1}" /-->
visible = "{stProcessRunning.active &amp;&amp; 1}" /-->
</a:hbox>
</a:bar>

Expand Down Expand Up @@ -81,11 +81,11 @@
flex="1"
realtime="true"
value="[@name]"
disabled="{!lstRunCfg.selected or [{lstRunCfg.selected}::@curfile]}"/>
disabled="{!lstRunCfg.selected || [{lstRunCfg.selected}::@curfile]}"/>
</a:hbox>
<a:hbox>
<a:label width="100" skin="black_label">File Path</a:label>
<a:textbox skin = "black_textbox" id="txtRunCfgName" flex="1" value="[@path]" disabled="{!lstRunCfg.selected or [{lstRunCfg.selected}::@curfile]}"/>
<a:textbox skin = "black_textbox" id="txtRunCfgName" flex="1" value="[@path]" disabled="{!lstRunCfg.selected || [{lstRunCfg.selected}::@curfile]}"/>
<!--a:button icon="folder.png" disabled="true" tooltip="Browse ..."></a:button-->

<!--a:divider span="2" skin="c9-divider-hor" /-->
Expand Down
2 changes: 1 addition & 1 deletion client/ext/save/save.xml
Expand Up @@ -88,7 +88,7 @@
<a:each match="[folder|file]">
<a:insert
match = "[folder]"
get = "{location.host and davProject.readdir([@path])}" />
get = "{location.host &amp;&amp; davProject.readdir([@path])}" />
<a:caption match="[@name]" />
<a:icon
match = "[folder]"
Expand Down
6 changes: 3 additions & 3 deletions client/ext/testpanel/testpanel.xml
Expand Up @@ -25,15 +25,15 @@
caption = "Run tests"
onclick = "require('ext/testpanel/testpanel').run(dgTestProject.getSelection());"
submenu = "mnuRunSettings"
visible = "{!(stTestRun.active or !dgTestProject.selected)}" />
visible = "{!(stTestRun.active || !dgTestProject.selected)}" />

<a:button
icon = "stop.png"
caption = "Stop Tests"
skin = "c9-toolbarbutton"
onclick = "require('ext/testpanel/testpanel').stop()"
visible = "{!btnTestRun.visible}"
disabled = "{!stTestRun.active or stTestRun.stopping}" />
disabled = "{!stTestRun.active || stTestRun.stopping}" />
</a:hbox>
</a:bar>

Expand Down Expand Up @@ -100,7 +100,7 @@
if ([@status] === '0')
<span style='color:red'>\[[@status-message]\]</span>
else if ([@status] == '1')
<span style='color:green'>\[PASS{[@status-message] and " [@status-message]"}\]</span>
<span style='color:green'>\[PASS{[@status-message] &amp;&amp; " [@status-message]"}\]</span>
else if ([@status] == '-1')
<span>\[{[@status-message].uCaseFirst()}\]</span>
else
Expand Down
2 changes: 1 addition & 1 deletion client/ext/tree/tree.xml
Expand Up @@ -77,7 +77,7 @@
<a:item match="[file|folder|project]" onclick="
var store = apf.clipboard.store;
apf.clipboard.copySelection(apf.activeElement);
apf.clipboard.pasteSelection(apf.activeElement);
apf.clipboard.pasteSelection(apf.activeElement, trFiles.selected ? trFiles.selected.parentNode : trFiles.getFirstTraverseNode());
apf.clipboard.store = store;
">Duplicate</a:item>
<a:divider />
Expand Down

0 comments on commit 2d8034f

Please sign in to comment.