]> source.dussan.org Git - jquery-ui.git/commitdiff
demos/index.html - added link to open demo in new window.
authorCa-Phun Ung <pazu2k@gmail.com>
Thu, 8 Jan 2009 06:50:51 +0000 (06:50 +0000)
committerCa-Phun Ung <pazu2k@gmail.com>
Thu, 8 Jan 2009 06:50:51 +0000 (06:50 +0000)
demos/demos.css
demos/index.html
tests/visual/datepicker.html

index e7adc657d70ac0642fb1e33ebff7067b896c53d1..51c576e360de8dc257cea23cda24e338eeab781e 100644 (file)
@@ -203,5 +203,5 @@ div.demo-description {
        padding-right: 10px;
 }
 
-#demo-link { font-size:11px;  margin:6px 0 20px 0; }
+#demo-link { font-size:11px;  padding-top: 6px; clear: both; overflow: hidden; }
 #demo-link a span.ui-icon { float:left; margin-right:3px; }
index fea9abd60559ee8c3b6443fc60479809a90189e3..8aeabfc155dad7e76d184d994a6a981f83e27fbb 100644 (file)
@@ -99,7 +99,7 @@
                                .append('<h3 class="demo-header">'+ header +'</h3>')
                                .append('<div id="demo-config"></div>')
                                .find('#demo-config')
-                                       .append('<div id="demo-frame"></div><div id="demo-config-menu"></div>')
+                                       .append('<div id="demo-frame"></div><div id="demo-config-menu"></div><div id="demo-link"><a class="demoWindowLink" href="#"><span class="ui-icon ui-icon-newwin"></span>Open demo in a new window</a></div>')
                                        .find('#demo-config-menu')
                                                .load(section + '/index.html .demos-nav', function() {
                                                        $('#demo-config-menu a').each(function() {
                                                        updateDemoNotes();
                                                })
                                        .end()
+                                       .find('#demo-link a')
+                                               .bind('click', function(ev){
+                                                       window.open(this.href);
+                                                       ev.preventDefault();
+                                               })
+                                       .end()
                                .end()
                        ;
                        
                                data = data.replace(/<title.*>.*<\/title>/ig,""); // Remove title tags
 
                                $('#demo-frame').empty().html(data);
+                               $('#demo-link a').attr('href', path);
                                updateDemoNotes();
 
                        });
                function updateDemoNotes() {
                        var notes = $('#demo-frame .demo-description');
                        if ($('#demo-notes').length == 0) {
-                               $('<div id="demo-notes"></div>sdfdffd').insertAfter('#demo-config');
+                               $('<div id="demo-notes"></div>').insertAfter('#demo-config');
                        }                                               
                        $('#demo-notes').hide().empty().html(notes.html());
                        $('#demo-notes').fadeIn();
                                        <p>
                                                These demos showcase some common uses of each jQuery UI plugin. Simply copy and paste code from the demos to get started. Have fun playing with them.
                                        </p>
-                                       
-                               
-                               <iframe></iframe>
-                               
-                               <div id="demo-link">
-                                       <a href="foo" class="demoWindowLink"><span class="ui-icon ui-icon-newwin"></span>Open demo in a new window</a>
-                               </div>
-                               
-                               <p>The description for the demo goes here, below the link to open the demo in a new window. The description for the demo goes here, below the link to open the demo in a new window. The description for the demo goes here, below the link to open the demo in a new window.</p>
                                
+                               <!-- change the class to class="source-open" when code is visible
                                <div id="demo-source">
-                                       <a href="#" class="source-closed">View source</a><!-- change the class to "source-open" when code is visible -->
+                                       <a href="#" class="source-closed">View source</a>
                                </div>
-                               
+                               -->
                                
                                        <?php  } ?>
                        </div>
index 6126398e39e718e5f8e18033db3b4f014156a052..d8c2ee5e155aeda0ce36df2bb539505bbfb6edc7 100644 (file)
@@ -40,7 +40,7 @@
                });
                
                // inline datepicker
-               $('#inl').datepicker();
+               $('#inl').datepicker({minDate: -20, maxDate: '+1M +10D'});
                $('button.disable-inl').click(function(event){
                        $('#inl').datepicker('disable');
                        event.preventDefault();