mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-10 17:23:23 +01:00
removing fixme from dialogForm function
This commit is contained in:
parent
edb91b92bd
commit
4b01f7c8ee
@ -78,7 +78,8 @@ jQuery.fn.dialogForm = function (options) {
|
|||||||
|
|
||||||
// Clear form values ...
|
// Clear form values ...
|
||||||
if (options.clearForm == undefined || options.clearForm) {
|
if (options.clearForm == undefined || options.clearForm) {
|
||||||
$("#" + containerId).find('input[name!="color"]').val('');
|
//FIXME: icon and color should be handled as exceptions..
|
||||||
|
$("#" + containerId).find('input[name!="color"]input[name!="icon"]').val('');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear button "Saving..." state ...
|
// Clear button "Saving..." state ...
|
||||||
@ -91,12 +92,6 @@ jQuery.fn.dialogForm = function (options) {
|
|||||||
formData[elem.name] = elem.value;
|
formData[elem.name] = elem.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
// FIX: How should I do this?
|
|
||||||
var icon = $("#defaultIcon");
|
|
||||||
if (icon) {
|
|
||||||
formData["icon"] = icon.find('i').attr('class');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Success actions ...
|
// Success actions ...
|
||||||
var onSuccess = function (jqXHR, textStatus, data) {
|
var onSuccess = function (jqXHR, textStatus, data) {
|
||||||
var resourceId = jqXHR ? jqXHR.getResponseHeader("ResourceId") : undefined;
|
var resourceId = jqXHR ? jqXHR.getResponseHeader("ResourceId") : undefined;
|
||||||
@ -545,6 +540,7 @@ $(function () {
|
|||||||
defaultIcon.find("i").remove();
|
defaultIcon.find("i").remove();
|
||||||
var myClass = $(this).attr("class");
|
var myClass = $(this).attr("class");
|
||||||
defaultIcon.prepend("<i class='" + myClass +"'></i>");
|
defaultIcon.prepend("<i class='" + myClass +"'></i>");
|
||||||
|
defaultIcon.closest("#iconGroup").find('input').val(myClass);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -353,7 +353,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="iconGroup" class="form-group">
|
<div id="iconGroup" class="form-group">
|
||||||
<label class="col-md-3 control-label" for="defaultIcon"><spring:message code="ICON"/>:</label>
|
<label class="col-md-3 control-label" for="iconChooser"><spring:message code="ICON"/>:</label>
|
||||||
|
<input class="form-control" name="icon" id="iconChooser" style="display: none" required="required" value="glyphicon glyphicon-tag"/>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<div class="btn dropdown-toggle" id="defaultIcon" data-toggle="dropdown">
|
<div class="btn dropdown-toggle" id="defaultIcon" data-toggle="dropdown">
|
||||||
<i class="glyphicon glyphicon-tag"></i>
|
<i class="glyphicon glyphicon-tag"></i>
|
||||||
|
Loading…
Reference in New Issue
Block a user