add label modal dialog

This commit is contained in:
Ezequiel Bergamaschi 2014-01-28 02:59:09 -03:00 committed by Ezequiel Bergamaschi
parent f048d0adb7
commit 81e9b5f59d
3 changed files with 50 additions and 1 deletions

View File

@ -73,6 +73,7 @@ ONLY_VIEW_PRIVATE = This mindmap can be viewed by you only.
ALL_VIEW_PUBLIC = This mindmap can be viewed by any user. ALL_VIEW_PUBLIC = This mindmap can be viewed by any user.
NEW_MAP_MSG=Create a new map NEW_MAP_MSG=Create a new map
NEW_LABEL_MSG=Create a new label NEW_LABEL_MSG=Create a new label
ADD_LABEL_MSG=Add label to maps
PUBLISH=Publish PUBLISH=Publish
PUBLISH_DETAILS=By publishing the map you make it visible to everyone on the Internet. PUBLISH_DETAILS=By publishing the map you make it visible to everyone on the Internet.
ACCOUNT_DETAIL=Do you want to change you user options?. Here is the place. ACCOUNT_DETAIL=Do you want to change you user options?. Here is the place.
@ -137,6 +138,7 @@ FILTERS=Filter
MORE=More MORE=More
ADD_NEW_MAP=Add New Map ADD_NEW_MAP=Add New Map
ADD_NEW_LABEL=Add New Label ADD_NEW_LABEL=Add New Label
ADD_LABEL=Add Label
IMPORTING=Importing ... IMPORTING=Importing ...
NEW=New NEW=New
NEW_MAP=Map NEW_MAP=Map
@ -144,7 +146,8 @@ NEW_LABEL=Label
MIND_FILE=File MIND_FILE=File
PARENT_LABEL=Nest label under PARENT_LABEL=Nest label under
CHOOSE_COLOR=Choose a color CHOOSE_COLOR=Choose a color
SELECT_LABEL=Please select a parent label CHOOSE_LABEL=Choose a label
SELECT_LABEL=Please select a label
NO_SEARCH_RESULT=No mindmap available for the selected filter criteria NO_SEARCH_RESULT=No mindmap available for the selected filter criteria
SEARCH=Search SEARCH=Search
GENERAL=General GENERAL=General

View File

@ -18,6 +18,22 @@ $(function () {
} }
); );
$("#linkBtn").click(
function () {
fetchLabels({
postUpdate: function(data) {
$.each(data.labels, function(index, value) {
$("#labelList").append($('<option></option>').val(index).html(value.title));
})
}
});
$("#add-label-dialog-modal").dialogForm({
//url:"c/restful/labels",
//postUpdate: createLabelItem
});
}
);
$("#duplicateBtn").click(function () { $("#duplicateBtn").click(function () {
// Map to be cloned ... // Map to be cloned ...
var tableElem = $('#mindmapListTable'); var tableElem = $('#mindmapListTable');

View File

@ -220,6 +220,11 @@
code="DELETE"/></button> code="DELETE"/></button>
</div> </div>
<div class="btn-group act-multiple" id="linkBtn" style="display:none">
<button class="btn btn-primary"><i class="icon-tag icon-white"></i> <spring:message
code="ADD_LABEL"/></button>
</div>
<div id="infoBtn" class="btn-group act-single" style="display:none"> <div id="infoBtn" class="btn-group act-single" style="display:none">
<button class="btn btn-primary"><i class="icon-exclamation-sign icon-white"></i> <spring:message <button class="btn btn-primary"><i class="icon-exclamation-sign icon-white"></i> <spring:message
code="INFO"/></button> code="INFO"/></button>
@ -353,6 +358,31 @@
</div> </div>
</div> </div>
<!-- Add label dialog -->
<div id="add-label-dialog-modal" title="<spring:message code="ADD_LABEL"/>" class="modal fade">
<div class="modal-header">
<button class="close" data-dismiss="modal">x</button>
<h3><spring:message code="NEW_LABEL_MSG"/></h3>
</div>
<div class="modal-body">
<div class="errorMessage"></div>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="labelList"><spring:message code="CHOOSE_LABEL"/>:</label>
<select id="labelList" class="control" autofocus="autofocus" required="required">
<option id="defaultOption" value="empty"><spring:message code="SELECT_LABEL"/></option>
</select>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-primary btn-accept" data-loading-text="<spring:message
code="SAVING"/>"><spring:message
code="CREATE"/></button>
<button class="btn btn-cancel" data-dismiss="modal"><spring:message code="CANCEL"/></button>
</div>
</div>
<!-- Duplicate map dialog --> <!-- Duplicate map dialog -->
<div id="duplicate-dialog-modal" class="modal fade"> <div id="duplicate-dialog-modal" class="modal fade">
<div class="modal-header"> <div class="modal-header">