瀏覽代碼

[pig] Show real script name when running from Script List

Enrico Berti 12 年之前
父節點
當前提交
8827db5f51
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apps/pig/static/js/pig.ko.js

+ 1 - 1
apps/pig/static/js/pig.ko.js

@@ -372,6 +372,7 @@ var PigViewModel = function (props) {
   }
   }
 
 
   function callRun(script) {
   function callRun(script) {
+    self.currentScript(script);
     $(document).trigger("running");
     $(document).trigger("running");
     $.post(self.RUN_URL,
     $.post(self.RUN_URL,
         {
         {
@@ -384,7 +385,6 @@ var PigViewModel = function (props) {
         },
         },
         function (data) {
         function (data) {
           if (data.id && self.currentScript().id() != data.id){
           if (data.id && self.currentScript().id() != data.id){
-            self.currentScript(script);
             script.id(data.id);
             script.id(data.id);
             $(document).trigger("loadEditor");
             $(document).trigger("loadEditor");
           }
           }