github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 850
    • 190
  • Source
  • Commits
  • Network (190)
  • Graphs
  • Tree: 1395a60

click here to add a description

click here to add a homepage

  • Switch Branches (8)
    • bind
    • devpreview
    • formcontrols
    • master
    • menu
    • panel
    • tooltip
    • widget-super
  • Switch Tags (21)
    • 1.9m2
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8.4
    • 1.8.3
    • 1.8.2
    • 1.8.1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
  • Contributors
Sending Request…

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

demos: droppable photo manager - fixed issue where dialog would not be centered 
when image first opened.
rdworth (author)
Mon Mar 02 03:57:08 -0800 2009
commit  1395a6047b7717978076
tree    0caac3aa474406598acb
parent  8fecd015cff46323cd7a
M demos/droppable/photo-manager.html 22 ••••
Txt demos/droppable/photo-manager.html
  • View file @ 1395a60
... ...
@@ -84,15 +84,19 @@
84 84
           var title = $link.siblings('img').attr('alt');
85 85
           var $modal = $('img[src$="'+src+'"]');
86 86
 
87  
-          $modal.length ? $modal.dialog('open') : $('<img alt="'+title+'" width="384" height="288" style="padding: 8px;" />').attr('src',src).appendTo('body').dialog({
88  
-            title: title,
89  
-            width: '400px',
90  
-            modal: 'true',
91  
-            overlay: {
92  
-              backgroundColor: '#000',
93  
-              opacity: 0.5
94  
-            }
95  
-          });
  87
+          if ($modal.length) {
  88
+            $modal.dialog('open')
  89
+          } else {
  90
+            var img = $('<img alt="'+title+'" width="384" height="288" style="display:none;padding: 8px;" />')
  91
+              .attr('src',src).appendTo('body');
  92
+            setTimeout(function() {
  93
+              img.dialog({
  94
+                  title: title,
  95
+                  width: 400,
  96
+                  modal: true
  97
+                });
  98
+            }, 1);
  99
+          }
96 100
         }
97 101
 
98 102
         // resolve the icons behavior with event delegation

0 notes on commit 1395a60

Please log in to comment.
Blog | Support | Training | Job Board | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server
  • English
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文