1 | function configureLabel(event, ui){ |
---|
2 | var idmarkernow = $(this).find('[name="labelItemId"]').val(); |
---|
3 | winElement.find('.edit-label').val(idmarkernow); |
---|
4 | winElement.find('.input-nome').val($(this).find("span").text()); |
---|
5 | |
---|
6 | var colorpicker = winElement.find('.lebals-colorpicker'); |
---|
7 | colorpicker.find('input[name="backgroundColor"]').val(rgb2hex($(this).css("backgroundColor"))) |
---|
8 | .css("background-color", $(this).css("backgroundColor")).focus().end() |
---|
9 | .find('input[name="fontColor"]').val(rgb2hex($(this).css("color"))).css("background-color", $(this).css("color")).focus().end() |
---|
10 | .find('input[name="borderColor"]').val(rgb2hex($(this).css("border-left-color"))).css("background-color", $(this).css("border-left-color")).focus().end() |
---|
11 | .find('.preview-label-outer').css({ |
---|
12 | 'background-color':$(this).css("backgroundColor"), |
---|
13 | 'color':$(this).css("color"), |
---|
14 | 'border-color':$(this).css("border-left-color") |
---|
15 | }) |
---|
16 | winElement.find(".preview-label-inner").text($(this).text()); |
---|
17 | } |
---|
18 | |
---|
19 | function editLabel(){ |
---|
20 | var conteudoSpan = $(this).parent().find(".text-list").text(); |
---|
21 | var span = $(this).parent().find(".text-list"); |
---|
22 | $(this).parent().trigger('click').unbind('click', configureLabel).find("span.text-list") |
---|
23 | .html('<input name="edit-value-list" class="edit-value-list" type="text" maxlength="18" value="'+conteudoSpan+'">').find("input[name='edit-value-list']").keydown(function(event){ |
---|
24 | event.stopPropagation(); |
---|
25 | $("input.edit-value-list").keyup(function () { |
---|
26 | var value = $(this).val(); |
---|
27 | winElement.find('.input-nome').val(value); |
---|
28 | }).keyup(); |
---|
29 | if(event.keyCode == 13){ |
---|
30 | event.preventDefault(); |
---|
31 | var nameLabel = $(".label-list").find(".edit-value-list").val(); |
---|
32 | $(span).html($(".label-list").find(".edit-value-list").val()) |
---|
33 | .parent().find('.edit').removeClass("hidden").parents("li").click(configureLabel).trigger("click"); |
---|
34 | save_editLabel(nameLabel, applyToSelectedMessages); |
---|
35 | |
---|
36 | }else if( event.keyCode == 27){ |
---|
37 | $(this).trigger("focusout"); |
---|
38 | } |
---|
39 | }).focusout(function(){ |
---|
40 | $(span).html(conteudoSpan) |
---|
41 | .parent().find('.edit').removeClass("hidden").parents("li").click(configureLabel); |
---|
42 | }).focus(); |
---|
43 | $(this).addClass("hidden"); |
---|
44 | } |
---|
45 | |
---|
46 | function deleteLabel(event){ |
---|
47 | var id = $(this).parents(".label-item").attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/)[1]; |
---|
48 | confirmDelete(id); |
---|
49 | event.stopImmediatePropagation(); |
---|
50 | } |
---|
51 | |
---|
52 | function colors_suggestions(){ |
---|
53 | return [ |
---|
54 | {name:'Padrão', border:'#3366cc', font:'#ffffff', background:'#3366cc'}, |
---|
55 | {name:'Coala', border:'#123456', font:'#ffffff', background:'#385c80'}, |
---|
56 | {name:'Tomate', border:'#d5130b', font:'#111111', background:'#e36d76'}, |
---|
57 | {name:'Limão', border:'#32ed21', font:'#1f3f1c', background:'#b2f1ac'}, |
---|
58 | {name:'Alto contraste', border:'#000000', font:'#ffffff', background:'#222222'} |
---|
59 | ] |
---|
60 | } |
---|
61 | |
---|
62 | function rgb2hex(rgb){ |
---|
63 | rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); |
---|
64 | return "#" + |
---|
65 | ("0" + parseInt(rgb[1],10).toString(16)).slice(-2) + |
---|
66 | ("0" + parseInt(rgb[2],10).toString(16)).slice(-2) + |
---|
67 | ("0" + parseInt(rgb[3],10).toString(16)).slice(-2); |
---|
68 | } |
---|
69 | |
---|
70 | function updateMessageLabels(idLabel){ |
---|
71 | var msgsReference = DataLayer.get('labeled', {filter: ['=', 'labelId', ''+idLabel]}, true); |
---|
72 | for(var i = 0; i < msgsReference.length; i++){ |
---|
73 | updateLabelsColumn({msg_number: msgsReference[i].messageNumber, boxname: msgsReference[i].folderName}); |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | function confirmDelete(id){ |
---|
78 | $.Zebra_Dialog('<strong>Deseja excluir esse marcador?</strong>', { |
---|
79 | 'type': 'question', |
---|
80 | 'title': 'Atenção', |
---|
81 | 'buttons': ['Sim','Não'], |
---|
82 | 'overlay_opacity': '0.5', |
---|
83 | 'onClose': function(caption) { |
---|
84 | if(caption == 'Sim'){ |
---|
85 | delete_label(id); |
---|
86 | } |
---|
87 | } |
---|
88 | }); |
---|
89 | } |
---|
90 | |
---|
91 | function save_editLabel(nameLabel, apply){ |
---|
92 | |
---|
93 | var lengthSpace = $.trim(nameLabel); |
---|
94 | |
---|
95 | if(lengthSpace.length >= 4){ |
---|
96 | var qtdLi = $(".label-list-container ul").find("li").not(".empty-item").length; |
---|
97 | // salvar marcador |
---|
98 | if(qtdLi > 0){ |
---|
99 | $(".save-label").button("disable"); |
---|
100 | var labelEdited = { |
---|
101 | id : winElement.find(".edit-label").val(), |
---|
102 | uid: User.me.id, |
---|
103 | name : winElement.find('.input-nome').val(), |
---|
104 | backgroundColor : winElement.find("input[name='backgroundColor']").val(), |
---|
105 | fontColor : winElement.find("input[name='fontColor']").val(), |
---|
106 | borderColor : winElement.find("input[name='borderColor']").val() |
---|
107 | } |
---|
108 | $(".label-list-container .label-list li").each(function(){ |
---|
109 | var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); |
---|
110 | |
---|
111 | if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ |
---|
112 | $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span class='text-list'>"+labelEdited.name+"</span><div class='button close tiny' style='float: right'></div><div class='button edit tiny' style='float: right'></div>").css({ |
---|
113 | "background" : labelEdited.backgroundColor, |
---|
114 | "color" : labelEdited.fontColor, |
---|
115 | "border-color" : labelEdited.borderColor |
---|
116 | }); |
---|
117 | } |
---|
118 | }); |
---|
119 | |
---|
120 | $("#MyMarckersList .label-list li").each(function(){ |
---|
121 | var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); |
---|
122 | |
---|
123 | if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ |
---|
124 | $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span>"+labelEdited.name+"</span>"); |
---|
125 | $(this).find(".square-color").css('background', labelEdited.backgroundColor); |
---|
126 | } |
---|
127 | }); |
---|
128 | DataLayer.put('label', labelEdited.id, labelEdited); |
---|
129 | DataLayer.commit(false, false, function(){ |
---|
130 | |
---|
131 | winElement.find(".insert-label").val(""); |
---|
132 | $.Watermark.ShowAll(); |
---|
133 | |
---|
134 | $(".label-list-container .label-list li").find('.button').button() |
---|
135 | .filter('.edit').button({icons:{primary:'ui-icon-pencil'}, text:false}).end() |
---|
136 | .filter('.close').button({icons:{primary:'ui-icon-close'}, text:false}); |
---|
137 | |
---|
138 | winElement.find('.edit').unbind("click").click(editLabel); |
---|
139 | winElement.find('.close').click(deleteLabel); |
---|
140 | |
---|
141 | draw_tree_labels(); |
---|
142 | updateMessageLabels(labelEdited.id); |
---|
143 | |
---|
144 | /** |
---|
145 | * Atualiza menu remove o menu presente em cada mensagem listada em uma pasta |
---|
146 | * e carrega novamente para que os dados sejam atualizados |
---|
147 | */ |
---|
148 | $.contextMenu( 'destroy', ".table_box tbody tr"); |
---|
149 | loadMenu(); |
---|
150 | }); |
---|
151 | // criar marcador |
---|
152 | } else { |
---|
153 | var nameLabel = winElement.find(".input-nome").val(); |
---|
154 | new_label(nameLabel, false, apply); |
---|
155 | winElement.find(".insert-label").val(""); |
---|
156 | $.Watermark.ShowAll(); |
---|
157 | } |
---|
158 | $(".label-list-container .label-list").find(".label-item-"+labelEdited.id).trigger("click"); |
---|
159 | } else { |
---|
160 | alert("Mínimo 4 caracteres"); |
---|
161 | } |
---|
162 | } |
---|
163 | |
---|
164 | function delete_label(id){ |
---|
165 | $(".label-list li").each(function () { |
---|
166 | var regex_match = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); |
---|
167 | if (regex_match && regex_match[1] && regex_match[1] == id) { |
---|
168 | $(this).remove(); |
---|
169 | } |
---|
170 | }); |
---|
171 | |
---|
172 | DataLayer.remove('label', id); |
---|
173 | DataLayer.commit(false, false, function(data){ |
---|
174 | $.contextMenu( 'destroy', ".table_box tbody tr"); |
---|
175 | loadMenu(); |
---|
176 | updateMessageLabels(id); |
---|
177 | }); |
---|
178 | winElement.find(".label-list li:first").trigger("click"); |
---|
179 | |
---|
180 | if($(".label-list li").length == 0){ |
---|
181 | winElement.find(".label-list-container").html('<ul class="label-list"><li class="empty-item">'+get_lang("No labels found.")+'.</li></ul>'); |
---|
182 | } |
---|
183 | var qtdLi = $(".label-list-container ul").find("li").not(".empty-item").length; |
---|
184 | if (qtdLi == 0){ |
---|
185 | $(".my-labels").addClass("hidden"); |
---|
186 | $(".label-list-container ul").find(".empty-item").css("display",""); |
---|
187 | winElement.find(".buttons .save-label .ui-button-text").text('Criar'); |
---|
188 | $(".delete-label").button("disable"); |
---|
189 | |
---|
190 | winElement.find('.input-nome').val(""); |
---|
191 | winElement.find(".preview-label-inner").text(""); |
---|
192 | |
---|
193 | var colorpicker = winElement.find('.lebals-colorpicker'); |
---|
194 | colorpicker.find('input[name="backgroundColor"]').val("#ebebeb") |
---|
195 | .css("background-color", "#ebebeb").focus().end() |
---|
196 | .find('input[name="fontColor"]').val("#000000").css("background-color", "#000000").focus().end() |
---|
197 | .find('input[name="borderColor"]').val("#000000").css("background-color", "#000000").focus().end() |
---|
198 | .find('.preview-label-outer').css({ |
---|
199 | 'background-color':"#ebebeb", |
---|
200 | 'color':"#000000", |
---|
201 | 'border-color':"#000000" |
---|
202 | }); |
---|
203 | $(".input-nome").keyup(function () { |
---|
204 | var value = $(this).val(); |
---|
205 | winElement.find('.preview-label-inner').text(value); |
---|
206 | }).keyup(); |
---|
207 | } |
---|
208 | } |
---|
209 | |
---|
210 | function new_label(nameLabel, isNew, apply){ |
---|
211 | var labelCreated = { |
---|
212 | uid: User.me.id, |
---|
213 | name : nameLabel, |
---|
214 | backgroundColor : !!isNew ? '#ebebeb' : winElement.find("input[name='backgroundColor']").val(), |
---|
215 | fontColor : !!isNew ? '#000000' : winElement.find("input[name='fontColor']").val(), |
---|
216 | borderColor :!!isNew ? '#000000' : winElement.find("input[name='borderColor']").val() |
---|
217 | } |
---|
218 | DataLayer.put('label', labelCreated); |
---|
219 | |
---|
220 | $(".add-label-button").removeClass("ui-icon ui-icon-plus") |
---|
221 | .html('<img alt="Carregando" title="Carregando" style="margin-left:10px;" src="../prototype/modules/mail/img/loader.gif" />'); |
---|
222 | |
---|
223 | DataLayer.commit(false, false, function(){ |
---|
224 | |
---|
225 | labels = DataLayer.get('label',{criteria:{order: 'id'}}, true); |
---|
226 | newLabel = { |
---|
227 | id: labels[labels.length - 1].id, |
---|
228 | name : labels[labels.length- 1].name, |
---|
229 | uid: User.me.id, |
---|
230 | bgColor : !!isNew ? '#ebebeb' : winElement.find("input[name='backgroundColor']").val(), |
---|
231 | fontColor : !!isNew ? '#000000' : winElement.find("input[name='fontColor']").val(), |
---|
232 | borderColor : !!isNew ? '#000000' : winElement.find("input[name='borderColor']").val() |
---|
233 | }; |
---|
234 | |
---|
235 | /** Marca as mensagens selecionadas com o marcador criado*/ |
---|
236 | if(apply){ |
---|
237 | labeledMessages(newLabel.id) |
---|
238 | } |
---|
239 | |
---|
240 | $(".label-list-container ul").find(".empty-item").css("display","none"); |
---|
241 | $(".label-list-container ul") |
---|
242 | .prepend(DataLayer.render("../prototype/modules/mail/templates/label_listitem.ejs", newLabel)) |
---|
243 | .find("li:first") |
---|
244 | .fadeIn("slow").click(configureLabel); |
---|
245 | |
---|
246 | draw_tree_labels(); |
---|
247 | |
---|
248 | $(".label-list-container .label-list li").not(".empty-item").click(function(){ |
---|
249 | $(".label-list-container .label-list li").find("img").remove(); |
---|
250 | $(".label-list-container .label-list li.label-item").removeClass("selected"); |
---|
251 | $(this).prepend("<img src='../prototype/modules/mail/img/triangle.png' style='margin: 0 5px 0 -5px;'>"); |
---|
252 | $(this).addClass("selected"); |
---|
253 | }); |
---|
254 | |
---|
255 | $(".label-list-container .label-list li").find('.button').button() |
---|
256 | .filter('.edit').button({icons:{primary:'ui-icon-pencil'}, text:false}).end() |
---|
257 | .filter('.close').button({icons:{primary:'ui-icon-close'}, text:false}); |
---|
258 | |
---|
259 | //posiciona para edição o label inserido |
---|
260 | winElement.find("ul.label-list li:first").trigger("click"); |
---|
261 | winElement.find(".buttons .save-label .ui-button-text").text('Salvar'); |
---|
262 | $(".delete-label").button("enable"); |
---|
263 | |
---|
264 | winElement.find('.edit').unbind("click").click(editLabel); |
---|
265 | winElement.find('.close').click(deleteLabel); |
---|
266 | |
---|
267 | $(".my-labels").removeClass("hidden"); |
---|
268 | |
---|
269 | $.contextMenu( 'destroy', ".table_box tbody tr"); |
---|
270 | loadMenu(); |
---|
271 | |
---|
272 | $(".add-label-button").empty() |
---|
273 | .addClass("ui-icon ui-icon-plus"); |
---|
274 | }); |
---|
275 | } |
---|
276 | |
---|
277 | function init_label(data){ |
---|
278 | |
---|
279 | winElement = data.window; |
---|
280 | |
---|
281 | //TODO Mudar quando API abstrair atualizações no cache |
---|
282 | DataLayer.remove('label',false); |
---|
283 | labels = DataLayer.get('label',{criteria:{order: 'name'}}); |
---|
284 | |
---|
285 | if(labels){ |
---|
286 | Label_List = winElement |
---|
287 | .find(".label-list-container").html(DataLayer.render("../prototype/modules/mail/templates/label_list.ejs", {labels: labels})); |
---|
288 | |
---|
289 | }else{ |
---|
290 | //Exibe a mensagem informando o usuário de que não há nenhum marcador cadastrado. |
---|
291 | Label_List = winElement |
---|
292 | .find(".label-list-container").html('<ul class="label-list"><li class="empty-item">'+get_lang("No labels found.")+'.</li></ul>'); |
---|
293 | |
---|
294 | } |
---|
295 | Label_List.end() |
---|
296 | .find('.button').button() |
---|
297 | .filter('.edit').button({icons:{primary:'ui-icon-pencil'}, text:false}).end() |
---|
298 | .filter('.close').button({icons:{primary:'ui-icon-close'}, text:false}); |
---|
299 | |
---|
300 | winElement.find('.edit').click(editLabel); |
---|
301 | winElement.find('.close').click(deleteLabel); |
---|
302 | |
---|
303 | //marca 'd agua |
---|
304 | winElement.find(".insert-label").Watermark(winElement.find(".insert-label").val()); |
---|
305 | |
---|
306 | $("input.insert-label").keyup(function () { |
---|
307 | $.Watermark.HideAll(); |
---|
308 | var value = $(this).val(); |
---|
309 | winElement.find('.input-nome').val(value); |
---|
310 | }).keyup(); |
---|
311 | |
---|
312 | if (!(labels)){ |
---|
313 | winElement.find(".buttons .save-label .ui-button-text").text('Criar'); |
---|
314 | $(".delete-label").button("disable"); |
---|
315 | }else{ |
---|
316 | winElement.find(".label-list li:first").addClass("selected").prepend("<img src='../prototype/modules/mail/img/triangle.png' style='margin: 0 5px 0 -5px;'>"); |
---|
317 | } |
---|
318 | $(".save-label").button("disable"); |
---|
319 | /** |
---|
320 | * seta a ação de click para os marcadores listados na tela |
---|
321 | */ |
---|
322 | winElement.find(".label-list li").not(".empty-item").click(configureLabel); |
---|
323 | |
---|
324 | if (data.selectedItem) |
---|
325 | winElement.find(".label-list li.label-item-"+data.selectedItem).trigger("click"); |
---|
326 | else |
---|
327 | winElement.find(".label-list li:first").trigger("click"); |
---|
328 | |
---|
329 | var dataColorPicker = { |
---|
330 | colorsSuggestions: colors_suggestions() |
---|
331 | }; |
---|
332 | |
---|
333 | winElement.find('select.color-suggestions').change(function() { |
---|
334 | $(".save-label").button("enable"); |
---|
335 | var colorpicker = winElement.find('.lebals-colorpicker'); |
---|
336 | var colors; |
---|
337 | if(colors = dataColorPicker.colorsSuggestions[$(this).val()]) { |
---|
338 | colorpicker |
---|
339 | .find('input[name="fontColor"]').val(colors.font).focus().end() |
---|
340 | .find('input[name="backgroundColor"]').val(colors.background).focus().end() |
---|
341 | .find('input[name="borderColor"]').val(colors.border).focus().end() |
---|
342 | |
---|
343 | .find('.preview-label-outer').css({ |
---|
344 | 'background-color':dataColorPicker.colorsSuggestions[$(this).val()].background, |
---|
345 | 'border-color':dataColorPicker.colorsSuggestions[$(this).val()].border, |
---|
346 | 'color':dataColorPicker.colorsSuggestions[$(this).val()].font |
---|
347 | }); |
---|
348 | } |
---|
349 | }); |
---|
350 | var colorpickerPreviewChange = function(color) { |
---|
351 | |
---|
352 | var pickedup = winElement.find('.colorwell-selected').val(color).css('background-color', color); |
---|
353 | |
---|
354 | $(".save-label").button("enable"); |
---|
355 | |
---|
356 | var colorpicker = winElement.find('.lebals-colorpicker'); |
---|
357 | |
---|
358 | if (pickedup.is('input[name="backgroundColor"]')) { |
---|
359 | colorpicker.find('.preview-label-outer').css('background-color',color); |
---|
360 | } else if (pickedup.is('input[name="fontColor"]')) { |
---|
361 | colorpicker.find('.preview-label-outer').css('color',color); |
---|
362 | } else if (pickedup.is('input[name="borderColor"]')) { |
---|
363 | colorpicker.find('.preview-label-outer').css('border-color',color); |
---|
364 | } |
---|
365 | } |
---|
366 | |
---|
367 | var f = $.farbtastic(winElement.find('.colorpicker'), colorpickerPreviewChange); |
---|
368 | var selected; |
---|
369 | |
---|
370 | winElement.find('.colorwell').each(function () { |
---|
371 | f.linkTo(this); |
---|
372 | }) |
---|
373 | .focus(function() { |
---|
374 | if (selected) { |
---|
375 | $(selected).removeClass('colorwell-selected'); |
---|
376 | } |
---|
377 | $(selected = this).addClass('colorwell-selected'); |
---|
378 | f.linkTo(this, colorpickerPreviewChange); |
---|
379 | f.linkTo(colorpickerPreviewChange); |
---|
380 | }); |
---|
381 | |
---|
382 | winElement.find(".add-label-button").click(function (event) { |
---|
383 | $.Watermark.HideAll(); |
---|
384 | var nameLabel = winElement.find(".insert-label").val(); |
---|
385 | |
---|
386 | var lengthSpace = $.trim(nameLabel); |
---|
387 | |
---|
388 | if(lengthSpace.length >= 4){ |
---|
389 | new_label(nameLabel, true, data.applyToSelectedMessages); |
---|
390 | $.Watermark.ShowAll(); |
---|
391 | winElement.find(".insert-label").val(""); |
---|
392 | } else { |
---|
393 | alert("Mínimo 4 caracteres"); |
---|
394 | } |
---|
395 | event.stopImmediatePropagation(); |
---|
396 | }); |
---|
397 | |
---|
398 | winElement.find('.insert-label').keydown(function(event, ui) { |
---|
399 | if (event.keyCode == 13) |
---|
400 | winElement.find(".add-label-button").trigger('click'); |
---|
401 | }); |
---|
402 | |
---|
403 | //excluir marcador {deve ser para o botão grande na janela de edição e nao o pequeno da lista} |
---|
404 | winElement.find(".buttons .delete-label").click(function(event){ |
---|
405 | var id = winElement.find(".edit-label").val(); |
---|
406 | confirmDelete(id); |
---|
407 | event.stopImmediatePropagation(); |
---|
408 | }); |
---|
409 | |
---|
410 | $(".label-list-container .label-list li").not(".empty-item").click(function(){ |
---|
411 | $(".label-list-container .label-list li").find("img").remove(); |
---|
412 | $(".label-list-container .label-list li.label-item").removeClass("selected"); |
---|
413 | $(this).prepend("<img src='../prototype/modules/mail/img/triangle.png' style='margin: 0 5px 0 -5px;'>"); |
---|
414 | $(this).addClass("selected"); |
---|
415 | }); |
---|
416 | |
---|
417 | //salvar/criar marcador |
---|
418 | winElement.find(".buttons .save-label").click(function(){ |
---|
419 | var nameLabel = winElement.find(".input-nome").val(); |
---|
420 | save_editLabel(nameLabel, data.applyToSelectedMessages); |
---|
421 | }); |
---|
422 | //desfazer marcador |
---|
423 | winElement.find(".buttons .undo-label").click(function(event){ |
---|
424 | var edit = winElement.find(".edit-label").val(); |
---|
425 | $(".label-list-container .label-list li").each(function(){ |
---|
426 | var regex_match_3 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); |
---|
427 | if(regex_match_3 && regex_match_3[1] && regex_match_3[1] == edit){ |
---|
428 | $(this).trigger("click"); |
---|
429 | } |
---|
430 | }); |
---|
431 | }); |
---|
432 | |
---|
433 | //fechar |
---|
434 | $(".button-close-window .close-window").click(function(){ |
---|
435 | $(".label-configure-win").dialog("close"); |
---|
436 | }); |
---|
437 | |
---|
438 | $(".configure-label-content").find("input[type='text']").focus(function () { |
---|
439 | $(this).keyup(function(){ |
---|
440 | var value = $(this).val(); |
---|
441 | if(value){ |
---|
442 | $(".save-label").button("enable"); |
---|
443 | }else{ |
---|
444 | $(".save-label").button("disable"); |
---|
445 | } |
---|
446 | }); |
---|
447 | }); |
---|
448 | |
---|
449 | $(".input-nome").keyup(function () { |
---|
450 | var value = $(this).val(); |
---|
451 | winElement.find('.preview-label-inner').text(value); |
---|
452 | }).keyup(); |
---|
453 | } |
---|
454 | /** |
---|
455 | * TODO: |
---|
456 | * * Qunado excluir um marcador deve ser removido das mensagens sem que seja necessario atualizar o Expresso. |
---|
457 | * * Quando editado um marcador dever ser atualizado na lista de mensagem onde esse marcador foi aplicado. |
---|
458 | */ |
---|