Skip to content

Commit 8712c0e

Browse files
committed
Prepare version 0.9.0 the first version
1 parent 1f258a1 commit 8712c0e

File tree

6 files changed

+21
-119
lines changed

6 files changed

+21
-119
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
/nbproject/
2-
pruebas.js

README.md

Lines changed: 0 additions & 112 deletions
This file was deleted.

bootstrap4/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ <h2>Projects</h2>
122122
</div>
123123
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
124124
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
125-
<script src='jquery-menu-editor.js?v5'></script>
125+
<script src='jquery-menu-editor.min.js'></script>
126126
<script src='bs-iconpicker/js/iconset/iconset-fontawesome-4.7.0.min.js'></script>
127127
<script src='bs-iconpicker/js/bootstrap-iconpicker.js'></script>
128128
<script>

jquery-menu-editor.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
2-
* A complete jQuery Menu Editor
3-
* @author David Ticona Saravia
2+
* jQuery Menu Editor
3+
* @author David Ticona Saravia https://github.com/davicotico
4+
* @version 0.9.0
45
* */
56
(function ($){
67
/**
@@ -854,7 +855,8 @@ function MenuEditor(idSelector, options) {
854855
}
855856
MenuEditor.updateButtons($main);
856857
});
857-
/*PRIVATE METHODS*/
858+
859+
/* PRIVATE METHODS */
858860
function editItem($item) {
859861
var data = $item.data();
860862
$.each(data, function (p, v) {
@@ -874,13 +876,15 @@ function MenuEditor(idSelector, options) {
874876
return 'empty';
875877
}
876878
}
879+
877880
function resetForm() {
878881
$form[0].reset();
879882
iconPicker = iconPicker.iconpicker(iconPickerOpt);
880883
iconPicker.iconpicker('setIcon', 'empty');
881884
$updateButton.attr('disabled', true);
882885
itemEditing = null;
883886
}
887+
884888
function stringToArray(str) {
885889
try {
886890
var obj = JSON.parse(str);
@@ -938,6 +942,7 @@ function MenuEditor(idSelector, options) {
938942
});
939943
return $elem;
940944
}
945+
941946
function TOpener(li){
942947
var opener = $('<span>').addClass('sortableListsOpener ' + options.opener.openerClass).css(options.opener.openerCss)
943948
.on('mousedown', function (e){
@@ -964,7 +969,7 @@ function MenuEditor(idSelector, options) {
964969
}
965970
});
966971
}
967-
/*PUBLIC METHODS*/
972+
/* PUBLIC METHODS */
968973
this.setForm = function(form){
969974
$form = form;
970975
};
@@ -1037,6 +1042,11 @@ function MenuEditor(idSelector, options) {
10371042
}
10381043
};
10391044
};
1045+
/* STATIC METHOD */
1046+
/**
1047+
* Update the buttons on the list. Only the buttons 'Up', 'Down', 'In', 'Out'
1048+
* @param {jQuery} $mainList The unorder list
1049+
**/
10401050
MenuEditor.updateButtons = function($mainList){
10411051
$mainList.find('.btnMove').show();
10421052
$mainList.updateButtons();

0 commit comments

Comments
 (0)