浏览代码

rename mouseOver to title

Sven Anders 10 年之前
父节点
当前提交
c906c91802
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. 4 4
      examples/index.html
  2. 3 3
      src/js/bootstrap-dialog.js

+ 4 - 4
examples/index.html

@@ -6,7 +6,7 @@
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/run_prettify.min.js"></script>
 <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.34.9/css/bootstrap-dialog.min.css" rel="stylesheet" type="text/css" />
-<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.34.9/js/bootstrap-dialog.min.js"></script>
+<script src="../dist/js/bootstrap-dialog.min.js"></script>
 <meta charset="utf-8" />
 <title>BootstrapDialog examples</title>
 <style>
@@ -146,10 +146,10 @@
             message: 'Hi Apple!',
             buttons: [{
                 label: 'Button 1',
-                mouseOver: 'Mouse over Button 1'
+                title: 'Mouse over Button 1'
             }, {
                 label: 'Button 2',
-                // no mouseOver as it is optional
+                // no title as it is optional
                 cssClass: 'btn-primary',
                 action: function(){
                     alert('Hi Orange!');
@@ -157,7 +157,7 @@
             }, {
                 icon: 'glyphicon glyphicon-ban-circle',
                 label: 'Button 3',
-                mouseOver: 'Mouse over Button 3',
+                title: 'Mouse over Button 3',
                 cssClass: 'btn-warning'
             }, {
                 label: 'Close',

+ 3 - 3
src/js/bootstrap-dialog.js

@@ -836,9 +836,9 @@
                 $button.append(button.label);
             }
 
-            // mouseOver
-            if (typeof button.mouseOver !== 'undefined') {
-                $button.attr('title',  button.mouseOver);
+            // title
+            if (typeof button.title !== 'undefined') {
+                $button.attr('title',  button.title);
             }
 
             // Css class