popup for label

This commit is contained in:
Ezequiel Bergamaschi 2014-01-21 01:42:00 -03:00 committed by Ezequiel Bergamaschi
parent 8bdc5f6b05
commit f4fb008f1b
3 changed files with 63 additions and 8 deletions

View File

@ -72,6 +72,7 @@ SHARED=Shared
ONLY_VIEW_PRIVATE = This mindmap can be viewed by you only.
ALL_VIEW_PUBLIC = This mindmap can be viewed by any user.
NEW_MAP_MSG=Create a new map
NEW_LABEL_MSG=Create a new label
PUBLISH=Publish
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.
@ -134,16 +135,20 @@ LANGUAGE=Language
FILTERS=Filter
MORE=More
ADD_NEW_MAP=Add New Map
ADD_NEW_LABEL=Add New Label
IMPORTING=Importing ...
NEW=New
NEW_MAP=New Map
NEW_FOLDER=New Folder
NEW_MAP=Map
NEW_LABEL=Label
MIND_FILE=File
PARENT_LABEL=Nest label under
SELECT_LABEL=Please select a parent label
NO_SEARCH_RESULT=No mindmap available for the selected filter criteria
SEARCH=Search
GENERAL=General
SECURITY=Security
MAP_NAME_HINT=Name of the new map to create
LABEL_NAME_HINT=Name of the new label to create
MAP_DESCRIPTION_HINT=Some description for your map
WARNING=Warning
DELETE_MAPS_WARNING=Deleted mindmap can not be recovered. Do you want to continue ?.

View File

@ -252,12 +252,15 @@ $(function () {
redirect:"c/maps/{header.resourceId}/edit",
url:"c/restful/maps"
});
});
}
);
//Eze todo hoy esta creando un dialog de mapa
$("#newFolderBtn").click(
function () {
window.alert('falta crear el dialog de folder')
$("#new-folder-dialog-modal").dialogForm({
//redirect:"c/maps/{header.resourceId}/edit",
//url:"c/restful/maps"
});
}
);
@ -395,6 +398,16 @@ $(function () {
dataTable.fnReloadAjax("c/restful/maps/?q=" + $(this).attr('data-filter'), callbackOnTableInit, true);
event.preventDefault();
});
$("#parentLblCheckbox").click(
function () {
if ($(this).is(":checked")) {
$("#dropdownLabel").prop("disabled", false);
} else {
$("#dropdownLabel").prop("disabled", true);
}
}
)
});
// Register time update functions ....

View File

@ -177,8 +177,8 @@
</li>
<li id="newFolderBtn">
<a href="#" onclick="return false">
<i class="icon-folder-open"></i>
<spring:message code="NEW_FOLDER"/>
<i class="icon-tag"></i>
<spring:message code="NEW_LABEL"/>
</a>
</li>
</ul>
@ -284,6 +284,43 @@
</div>
</div>
<!-- New label dialog -->
<div id="new-folder-dialog-modal" title="<spring:message code="ADD_NEW_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">
<fieldset>
<div class="control-group">
<label class="control-label" for="newLabelTitle"><spring:message code="NAME"/>: </label>
<input class="control" name="title" id="newLabelTitle" type="text" required="required"
placeholder="<spring:message code="LABEL_NAME_HINT"/>" autofocus="autofocus" maxlength="255"/>
</div>
<div class="control-label">
<input id="parentLblCheckbox" type="checkbox">
<label for="parentLblCheckbox" style="display: inline-block"><spring:message code="PARENT_LABEL"/>:</label>
</div>
<select id="dropdownLabel" class="control" disabled autofocus="autofocus">
<option id="defaultOption" value="empty"><spring:message code="SELECT_LABEL"/></option>
<option value="1">Dummy Label</option>
<option value="2">-> Child</option>
<option value="3">-> Child2</option>
<option value="4">Dummy</option>
</select>
</fieldset>
</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 -->
<div id="duplicate-dialog-modal" class="modal fade">
<div class="modal-header">