Changeset 5901
- Timestamp:
- 04/09/12 17:55:40 (12 years ago)
- Location:
- trunk/prototype/modules/calendar
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/css/layout.css
r5879 r5901 390 390 font-size: 0.9em; 391 391 } 392 393 .import-export-win .button.remove-attachment {margin: -2px 0 0px 10px;} 394 392 395 .import-export-win form { padding: 10px; } 393 396 .import-export-win p.input-group * { float:left; } … … 461 464 overflow-x: hidden !important; 462 465 overflow-y: auto !important; 466 height: 210px; 463 467 } 464 468 465 469 .user-acls-shared-calendar{ 466 width: 130px; 467 float: right; 468 margin-right: 2px; 470 width: 130px; 471 float: right; 472 position: absolute; 473 left: 190px; 474 background: white; 469 475 } 470 476 -
trunk/prototype/modules/calendar/js/calendar.codecs.js
r5835 r5901 267 267 Calendar.load(); 268 268 269 /* Todo será implementado funcionalidades ajax no calback de importacao de eventos */270 isValidCalback = false;271 272 269 /*Todo Melhorias serão feitas na API*/ 273 270 //DataLayer.poll( "schedulable" ); … … 285 282 }); 286 283 } 287 });288 289 DataLayer.listen( "calendarToSchedulable", function( status, updateData){290 291 if( status === 'client' ){292 if(updateData && isValidCalback){293 isValidCalback = false;294 $.Zebra_Dialog('Evento(s) importados com sucesso!', {295 'overlay_opacity': '0.5',296 'onClose': function(clicked) {297 Calendar.rerenderView();298 }299 });300 }else if(updateData == false){301 $.Zebra_Dialog('Erro ao importar evento(s)!', {302 'overlay_opacity': '0.5'303 });304 }305 };306 284 }); 307 285 -
trunk/prototype/modules/calendar/js/helpers.js
r5863 r5901 2161 2161 tabsImportExport.find('option[value="'+calendarId+'"]').attr('selected','selected').trigger('change'); 2162 2162 2163 2163 var form = false; 2164 $('.import-event-form').fileupload({ 2165 sequentialUploads: true, 2166 add: function (e, data) { 2167 form = data 2168 var name = form.files[0].name; 2169 $('.import-event-form').find('input[type="file"]').hide(); 2170 $('.import-event-form').find('span.file-add').removeClass('hidden'); 2171 $('.import-event-form').find('span.file-add').append('<span>'+ name +'</span><a class="button remove-attachment tiny"></a>'); 2172 $('.import-event-form').find('.button.remove-attachment').button({ 2173 icons: { 2174 primary: "ui-icon-close" 2175 }, 2176 text: false 2177 }).click(function (event){ 2178 $('.import-event-form').find('input[type="file"]').show(); 2179 $('.import-event-form').find('span.file-add').addClass('hidden').html(''); 2180 form = false; 2181 }); 2182 2183 2184 }, 2185 done: function(e, data){ 2186 var msg = ''; 2187 var type = ''; 2188 2189 if(!!data.result && data.result == "[][[]]"){ 2190 msg = 'Não foram encontrados novos eventos na importação!'; 2191 type = 'information'; 2192 }else if(!!data.result && data.result == '[][false]'){ 2193 msg = 'Erro ao realizar a importação, por favor verifique o arquivo .ics'; 2194 type = 'warning'; 2195 }else{ 2196 msg = 'Importação realizada com sucesso!'; 2197 type = 'confirmation'; 2198 Calendar.rerenderView(true); 2199 } 2200 2201 $.Zebra_Dialog(msg, { 2202 'type': type, 2203 'overlay_opacity': '0.5', 2204 'buttons': ['Fechar'] 2205 }); 2206 } 2207 }); 2208 2164 2209 UI.dialogs.importCalendar.find(".menu-import-event") 2165 2210 .children(".import").click(function(data){ … … 2168 2213 Calendar.signatureOf[$('.import-event-form option:selected').val()].calendar.timezone 2169 2214 +'"/>') 2170 2171 $('.import-event-form', UI.dialogs.importCalendar).submit();2215 if(form) 2216 form.submit(); 2172 2217 UI.dialogs.importCalendar.dialog("close"); 2173 isValidCalback = true;2174 2218 /** 2175 2219 * TODO - implementar ação de importação -
trunk/prototype/modules/calendar/templates/import_export.ejs
r5409 r5901 18 18 <p class="input-group"> 19 19 <label for="data">Arquivo:</label> 20 <span class="hidden file-add"></span> 20 21 <input type="file" name="data" value=""/> 21 22 <span class="tip">Escolha o arquivo que contenha um ou vários eventos. A Agenda do Expresso pode importar informações de evento no formato iCal.</span>
Note: See TracChangeset
for help on using the changeset viewer.