Pman.Dialog.CoreNotifyRecurKeywords.bjs
authorEdward <edward@roojs.com>
Mon, 4 May 2015 07:46:31 +0000 (15:46 +0800)
committerEdward <edward@roojs.com>
Mon, 4 May 2015 07:46:31 +0000 (15:46 +0800)
Pman.Dialog.CoreNotifyRecurKeywords.js

Pman.Dialog.CoreNotifyRecurKeywords.bjs
Pman.Dialog.CoreNotifyRecurKeywords.js

index f2fbcda..90d53c4 100644 (file)
            "items" : [
             {
              "listeners" : {
-              "beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    \n    var s = _this.form.findField('campaign_id').getValue() * 1;\n    \n    if(s < 1){\n        return false;\n    }\n    \n    o.params.is_active  = 1;\n    o.params.is_keyword = 1;\n    o.params.project_id = s;\n}\n"
+              "beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    \n    var s = _this.form.findField('campaign_id').getValue() * 1;\n    \n    if(isNaN(s) || s < 1){\n        return false;\n    }\n    \n    o.params.is_active  = 1;\n    o.params.is_keyword = 1;\n    o.params.project_id = s;\n}\n"
              },
              "xtype" : "Store",
              "remoteSort" : true,
index fb85e8b..2569c1a 100644 (file)
@@ -239,7 +239,7 @@ Pman.Dialog.CoreNotifyRecurKeywords = {
                   
                   var s = _this.form.findField('campaign_id').getValue() * 1;
                   
-                  if(s < 1){
+                  if(isNaN(s) || s < 1){
                       return false;
                   }