Commits

Christoffer Niska committed 657c5d1

fixed some demo issues

Comments (0)

Files changed (1)

demo/protected/views/site/index.php

 
 	// Prevent jumping to the top of the page when demo links are clicked.
 	jQuery('.site-index a').on('click', function(e) {
-		return false;
+	    var element = $(this),
+	        href = element.attr('href'),
+	        toggle = element.attr('data-toggle');
+
+	    if ((href && (href.length === 0 || href === '#')) && !toggle) {
+	            return false;
+	    }
 	});
+
+    // Prevent form submission.
+	jQuery('.site-index form').on('submit', false);
 ");
 ?>
 <div class="site-index">
             <h3>Large</h3>
             <p>
                 <?php $this->widget('bootstrap.widgets.TbButton', array(
-                'label'=>'Primary', 'type'=>'primary', 'size'=>'large',
-            )); ?>
-
+                    'label'=>'Primary', 'type'=>'primary', 'size'=>'large',
+                )); ?>
                 <?php $this->widget('bootstrap.widgets.TbButton', array(
-                'label'=>'Action', 'size'=>'large',
-            )); ?>
+                    'label'=>'Action', 'size'=>'large',
+                )); ?>
             </p>
         </div>
 
             <h3>Normal</h3>
             <p>
                 <?php $this->widget('bootstrap.widgets.TbButton', array(
-                'label'=>'Primary', 'type'=>'primary',
-            )); ?>
-
+                    'label'=>'Primary', 'type'=>'primary',
+                )); ?>
                 <?php $this->widget('bootstrap.widgets.TbButton', array(
-                'label'=>'Action',
-            )); ?>
+                    'label'=>'Action',
+                )); ?>
             </p>
         </div>
 
             <h3>Small</h3>
             <p>
                 <?php $this->widget('bootstrap.widgets.TbButton', array(
-                'label'=>'Primary', 'type'=>'primary', 'size'=>'small',
-            )); ?>
-
+                    'label'=>'Primary', 'type'=>'primary', 'size'=>'small',
+                )); ?>
                 <?php $this->widget('bootstrap.widgets.TbButton', array(
-                'label'=>'Action', 'size'=>'small',
-            )); ?>
+                    'label'=>'Action', 'size'=>'small',
+                )); ?>
             </p>
         </div>
 
             <h3>Mini</h3>
             <p>
                 <?php $this->widget('bootstrap.widgets.TbButton', array(
-                'label'=>'Primary', 'type'=>'primary', 'size'=>'mini',
-            )); ?>
-
+                    'label'=>'Primary', 'type'=>'primary', 'size'=>'mini',
+                )); ?>
                 <?php $this->widget('bootstrap.widgets.TbButton', array(
-                'label'=>'Action', 'size'=>'mini',
-            )); ?>
+                    'label'=>'Action', 'size'=>'mini',
+                )); ?>
             </p>
         </div>
     </div>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.