Added functionality to remove the notice data attachment
This commit is contained in:
parent
d1d5347ba3
commit
6a0571d51b
14
js/util.js
14
js/util.js
@ -222,6 +222,7 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
$("#notice_data-text").val("");
|
$("#notice_data-text").val("");
|
||||||
$("#notice_data-attach").val("");
|
$("#notice_data-attach").val("");
|
||||||
|
$('#notice_data-attach_selected').remove();
|
||||||
counter();
|
counter();
|
||||||
}
|
}
|
||||||
$("#form_notice").removeClass("processing");
|
$("#form_notice").removeClass("processing");
|
||||||
@ -233,7 +234,7 @@ $(document).ready(function(){
|
|||||||
$("#form_notice").each(addAjaxHidden);
|
$("#form_notice").each(addAjaxHidden);
|
||||||
NoticeReply();
|
NoticeReply();
|
||||||
NoticeAttachments();
|
NoticeAttachments();
|
||||||
NoticeDataAttachSelected();
|
NoticeDataAttach();
|
||||||
});
|
});
|
||||||
|
|
||||||
function NoticeReply() {
|
function NoticeReply() {
|
||||||
@ -312,10 +313,15 @@ function NoticeAttachments() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function NoticeDataAttachSelected() {
|
function NoticeDataAttach() {
|
||||||
$('#notice_data-attach').change(function() {
|
NDA = $('#notice_data-attach');
|
||||||
S = '<div id="notice_data-attach_selected" class="success">'+$(this).val()+'</div>';
|
NDA.change(function() {
|
||||||
|
S = '<div id="notice_data-attach_selected" class="success"><code>'+$(this).val()+'</code> <button>×</button></div>';
|
||||||
NDAS = $('#notice_data-attach_selected');
|
NDAS = $('#notice_data-attach_selected');
|
||||||
(NDAS.length > 0) ? NDAS.replaceWith(S) : $('#form_notice').append(S);
|
(NDAS.length > 0) ? NDAS.replaceWith(S) : $('#form_notice').append(S);
|
||||||
|
$('#notice_data-attach_selected button').click(function(){
|
||||||
|
$('#notice_data-attach_selected').remove();
|
||||||
|
NDA.val('');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -517,8 +517,19 @@ clear:both;
|
|||||||
width:81.5%;
|
width:81.5%;
|
||||||
margin-bottom:0;
|
margin-bottom:0;
|
||||||
line-height:1.618;
|
line-height:1.618;
|
||||||
|
}
|
||||||
|
#form_notice #notice_data-attach_selected code {
|
||||||
|
float:left;
|
||||||
|
width:90%;
|
||||||
|
display:block;
|
||||||
|
font-size:1.1em;
|
||||||
|
line-height:1.8;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
}
|
}
|
||||||
|
#form_notice #notice_data-attach_selected button {
|
||||||
|
float:right;
|
||||||
|
font-size:0.8em;
|
||||||
|
}
|
||||||
|
|
||||||
/* entity_profile */
|
/* entity_profile */
|
||||||
.entity_profile {
|
.entity_profile {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user