Skip to content

Commit f881b30

Browse files
committed
Include new demo using plugin Smartmenus 1.1.0 (file ejemplo2.php)
1 parent b0ddc08 commit f881b30

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/nbproject/private/
22
/nbproject/
33
/version3/
4-
/version2/
4+
/version2/
5+
/smartmenus/

ejemplo2.php

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
/**
33
* @author David Ticona Saravia
44
*/
5-
include "BootstrapMenu.php";
6-
$str = '[{"text":"Home", "href": "#home", "title": "Home"}, {"text":"About", "href": "#", "title": "About", "children": [{"text":"Action", "href": "#action", "title": "Action"}, {"text":"Another action", "href": "#another", "title": "Another action"}]}, {"text":"Something else here", "href": "#something", "title": "Something else here"}]';
7-
$qMenu = new BootstrapMenu(array('data'=>$str));
8-
$qMenu->setActiveItem('http://codeignitertutoriales.com');
9-
$qMenu->insert(array("text"=>'Ooh!', "href"=>'http://codeignitertutoriales.com', "title"=>'Awesome'), 'Another action', 'About');
10-
$qMenu->insert(array("text"=>'Ultimo item', "href"=>'https://github.com/davicotico', "title"=>'My Github'));
11-
$qMenu->replace(array('text'=>'About Wow', 'href'=>'about', 'title'=>'Hey'), 'Home');
5+
include "QuickMenu.php";
6+
$str = '[{"text":"Home","href":"http://home.com","icon":"fa fa-home","target":"_top","title":"My Home","children":[{"text":"Opcion2","href":"","icon":"fa fa-bar-chart-o","target":"_self","title":""},{"text":"Opcion3","href":"","icon":"fa fa-cloud-upload","target":"_self","title":""}]},{"text":"Opcion4","href":"","icon":"fa fa-crop","target":"_self","title":""},{"text":"Opcion5","href":"","icon":"fa fa-flask","target":"_self","title":""},{"text":"Opcion7","href":"","icon":"fa fa-search","target":"_self","title":"","children":[{"text":"Opcion7-1","href":"","icon":"fa fa-plug","target":"_self","title":"","children":[{"text":"Opcion7-1-1","href":"","icon":"fa fa-filter","target":"_self","title":""},{"text":"Opcion6","href":"","icon":"fa fa-map-marker","target":"_self","title":""}]}]}]';
7+
$qMenu = new QuickMenu(array('data'=>$str));
8+
$qMenu->setDropdownIcon('<i class="caret"></i>');
9+
$qMenu->set('ul-root', array('class'=>'nav navbar-nav', 'id'=>'#myMenu'));
10+
$qMenu->set('ul', array('class'=>'dropdown-menu'));
11+
$qMenu->set('a-parent', array('data-toggle'=>"dropdown", 'role'=>"button", 'aria-haspopup'=>"true", 'aria-expanded'=>"false"));
1212
$menu = $qMenu->html(); ?>
1313
<!DOCTYPE html>
1414
<html lang="es">
@@ -20,6 +20,7 @@
2020
<meta name="author" content="David Ticona Saravia">
2121
<title>Ejemplo #2 - QuickMenu & Smartmenus</title>
2222
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
23+
<link href="smartmenus/addons/bootstrap/jquery.smartmenus.bootstrap.css" rel="stylesheet">
2324
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
2425
<!--[if lt IE 9]>
2526
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
@@ -55,6 +56,25 @@
5556
<a class="btn btn-lg btn-primary" href="https://www.youtube.com/c/DavidTiconaSaravia" target="_blank" role="button">Inscríbete a mi canal en Youtube &raquo;</a>
5657
</p>
5758
</div>
59+
<div class="row">
60+
<div class="col-md-12">
61+
<h3>INSTRUCCIONES.-</h3>
62+
<ul>
63+
<li>Bootstrap solo acepta menus de hasta 2 niveles.</li>
64+
<li>Para menus de niveles ilimitados se necesita un plugin. Bajar la ultima version del plugin <strong>Smartmenus <a href="https://github.com/vadikom/smartmenus/archive/1.1.0.zip" target="_blank">Click Aqui</a></strong></li>
65+
<li>La estructura de archivos necesarios es la siguiente:</li>
66+
</ul>
67+
<pre>
68+
ejemplo2.php
69+
smartmenus/
70+
jquery.smartmenus.min.js
71+
addons/
72+
bootstrap/
73+
jquery.smartmenus.bootstrap.js
74+
jquery.smartmenus.bootstrap.css
75+
</pre>
76+
</div>
77+
</div>
5878
</div>
5979
<!-- Placed at the end of the document so the pages load faster -->
6080
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
@@ -63,4 +83,4 @@
6383
<script type="text/javascript" src="smartmenus/jquery.smartmenus.min.js"></script>
6484
<script type="text/javascript" src="smartmenus/addons/bootstrap/jquery.smartmenus.bootstrap.js"></script>
6585
</body>
66-
</html>
86+
</html>

0 commit comments

Comments
 (0)