|
@@ -77,7 +77,11 @@ $(document).ready(function() {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- function showPath(parent, target = $(".path"), showEdit = true, renderTree = false) {
|
|
|
|
|
|
|
+ function showPath(parent, target, hideEdit, renderTree) {
|
|
|
|
|
+ var target = target || $(".path")
|
|
|
|
|
+ var hideEdit = hideEdit || false
|
|
|
|
|
+ var showEdit = ! hideEdit
|
|
|
|
|
+ var renderTree = renderTree || false
|
|
|
|
|
|
|
|
var link = BASE_URL + "index.php?_route=UrlAction_ProcesEditor&_task=getPathAjax&id=" + parent;
|
|
var link = BASE_URL + "index.php?_route=UrlAction_ProcesEditor&_task=getPathAjax&id=" + parent;
|
|
|
$.get(link, function(data) {
|
|
$.get(link, function(data) {
|
|
@@ -502,7 +506,7 @@ $(document).ready(function() {
|
|
|
var target = $(this).closest(".p5bModalModal")
|
|
var target = $(this).closest(".p5bModalModal")
|
|
|
//pathModal(target);
|
|
//pathModal(target);
|
|
|
//showPath(state[0]["parent_id"]);
|
|
//showPath(state[0]["parent_id"]);
|
|
|
- showPath(state[0]["parent_id"], ".pathPreview", false, true);
|
|
|
|
|
|
|
+ showPath(state[0]["parent_id"], ".pathPreview", true, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
})
|
|
@@ -553,7 +557,7 @@ $(document).ready(function() {
|
|
|
+ "<button type='button' class='btn btn-default p5BModalButton' id='previousPath'>Anuluj</button>"
|
|
+ "<button type='button' class='btn btn-default p5BModalButton' id='previousPath'>Anuluj</button>"
|
|
|
+ "");
|
|
+ "");
|
|
|
$("#pathList").data("previous", state[0]["parent_id"])
|
|
$("#pathList").data("previous", state[0]["parent_id"])
|
|
|
- showPath(state[0]["parent_id"], ".pathPreview", false, true);
|
|
|
|
|
|
|
+ showPath(state[0]["parent_id"], ".pathPreview", true, true);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2217,7 +2221,9 @@ $(document).ready(function() {
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function getIndexById(id, arr = state, label = "id") {
|
|
|
|
|
|
|
+ function getIndexById(id, arr, label) {
|
|
|
|
|
+ var arr = arr || state
|
|
|
|
|
+ var label = label || "id"
|
|
|
var result = arr.length - 1;
|
|
var result = arr.length - 1;
|
|
|
if (label == "ID")
|
|
if (label == "ID")
|
|
|
result = -1;
|
|
result = -1;
|