unknown преди 5 години
родител
ревизия
1b92b2d00e
променени са 2 файла, в които са добавени 31 реда и са изтрити 14 реда
  1. 2 2
      o2web/source/o2_core/o2/widget/$Dialog/mobile_blue_flat/dialog.html
  2. 29 12
      o2web/source/o2_core/o2/xDesktop/Dialog.js

+ 2 - 2
o2web/source/o2_core/o2/widget/$Dialog/mobile_blue_flat/dialog.html

@@ -5,7 +5,7 @@
     </div>
     <div class="MWF_dialod_content" style="text-align: left; padding: 0px; line-height:20px;background:#f5f5f5;overflow:auto;"></div>
     <div class="MWF_dialod_button" style="height: 64px; margin: 0px 0px;background: #ffffff;border-top:1px solid #F0F0F0;">
-        <input type="button" class="MWF_dialod_cancel_button" style="display: none;"/>
-        <input type="button" class="MWF_dialod_ok_button" style="display: none;"/>
+        <div class="MWF_dialod_cancel_button" style="display: none;"></div>
+        <div class="MWF_dialod_ok_button" style="display: none;"></div>
     </div>
 </div>

+ 29 - 12
o2web/source/o2_core/o2/xDesktop/Dialog.js

@@ -134,19 +134,36 @@ o2.xDesktop.Dialog = o2.DDL = new Class({
                     button = this.cancelButton;
                     button.show();
                 }else{
-                    button = new Element("input", {
-                        "type": "button"
-                    }).inject(this.button);
-                }
-                button.set({
-                    "value": bt.text,
-                    "title": bt.title,
-                    "styles": styles,
-                    "class": (bt.type!=="cancel") ? "mainColor_bg" : "",
-                    "events": {
-                        "click": function(e){bt.action.call(this, this, e)}.bind(this)
+                    if( !bt.tag ){
+                        button = new Element("input", {
+                            "type": "button"
+                        }).inject(this.button);
+                    }else{
+                        button = new Element( bt.tag, {}).inject(this.button);
                     }
-                })
+                }
+                debugger;
+                if( button.get("type") === "button" ){
+                    button.set({
+                        "value": bt.text,
+                        "title": bt.title,
+                        "styles": styles,
+                        "class": (bt.type!=="cancel") ? "mainColor_bg" : "",
+                        "events": {
+                            "click": function(e){bt.action.call(this, this, e)}.bind(this)
+                        }
+                    })
+                }else{
+                    button.set({
+                        "text": bt.text,
+                        "title": bt.title,
+                        "styles": styles,
+                        "class": (bt.type!=="cancel") ? "mainColor_bg" : "",
+                        "events": {
+                            "click": function(e){bt.action.call(this, this, e)}.bind(this)
+                        }
+                    })
+                }
             }.bind(this));
         }
     },