Changeset 7720 for trunk/prototype/modules
- Timestamp:
- 01/09/13 13:40:01 (12 years ago)
- Location:
- trunk/prototype/modules/mail
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/mail/interceptors/Helpers.php
r7551 r7720 146 146 //followupflag:before.find 147 147 public function addDefaultElementsFilter (&$uri , &$params , &$criteria , $original ){ 148 $log = fopen('/tmp/adriano.log', 'a') or die('Nao foi possivel abrir o arquivo /tmp/1.log\n'); 149 fwrite($log, "uri = " . var_export($uri, true) . "\n"); 150 fwrite($log, "params = " . var_export($params, true) . "\n"); 151 fwrite($log, "criteria = " . var_export($criteria, true) . "\n"); 152 fwrite($log, "original = " . var_export($original, true) . "\n"); 153 fclose($log); 154 148 155 //if (!self::in_arrayr('id', $criteria['filter'])) { 149 156 $defaultsFilter = array( 'IN' , 'id' , array('1','2','3','4','5','6') ); … … 289 296 $imap_result = Controller::find($imap_uri, false, $imap_criteria); 290 297 298 $log = fopen('/tmp/adriano.log', 'a') or die('Nao foi possivel abrir o arquivo /tmp/1.log\n'); 299 fwrite($log, "\n\n INTERCEPTORS "); 300 fwrite($log, "\n\n imap_result = " . var_export($imap_result, true) . "\n\n"); 301 fclose($log); 302 291 303 /** 292 304 * Mescla os dados vindos do PostgreSQL com os dados vindos do Imap … … 337 349 } 338 350 351 $log = fopen('/tmp/adriano.log', 'a') or die('Nao foi possivel abrir o arquivo /tmp/1.log\n'); 352 fwrite($log, "uri = " . var_export($uri, true) . "\n\n"); 353 fwrite($log, "result = " . var_export($result, true) . "\n\n"); 354 //fwrite($log, "criteria = " . var_export($criteria, true) . "\n\n"); 355 //fwrite($log, "original = " . var_export($original, true) . "\n\n"); 356 fwrite($log, "merge_result = " . var_export($merge_result, true) . "\n\n"); 357 fclose($log); 358 339 359 return $merge_result; 340 360 } -
trunk/prototype/modules/mail/js/followupflag.js
r7612 r7720 60 60 folder = current_folder; 61 61 62 /**63 * Implementação do widget de input-combobox64 */65 66 (function( $ ) {67 $.widget( "ui.combobox", {68 _create: function() {69 var self = this,70 select = this.element.hide(),71 selected = select.children( ":selected" ),72 value = selected.val() ? selected.text() : "";73 var input = this.input = $( "<input>" )74 .insertAfter( select )75 .val( value )76 .autocomplete({77 delay: 0,78 minLength: 0,79 source: function( request, response ) {80 var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );81 response( select.children( "option" ).map(function() {82 var text = $( this ).text();83 if ( this.value && ( !request.term || matcher.test(text) ) )84 return {85 label: text.replace(86 new RegExp(87 "(?![^&;]+;)(?!<[^<>]*)(" +88 $.ui.autocomplete.escapeRegex(request.term) +89 ")(?![^<>]*>)(?![^&;]+;)", "gi"90 ), "<strong>$1</strong>" ),91 value: text,92 option: this93 };94 }) );95 },96 select: function( event, ui ) {97 ui.item.option.selected = true;98 self._trigger( "selected", event, {99 item: ui.item.option100 });101 },102 change: function( event, ui ) {103 if ( !ui.item ) {104 var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),105 valid = false;106 select.children( "option" ).each(function() {107 if ( $( this ).text().match( matcher ) ) {108 this.selected = valid = true;109 return false;110 }111 });112 /*113 if ( !valid ) {114 // remove invalid value, as it didn't match anything115 $( this ).val( "" );116 select.val( "" );117 input.data( "autocomplete" ).term = "";118 return false;119 }120 */121 if ( !valid ) {122 if(select.has('option[value="custom"]').length > 0) {123 select.find('option:last').val('custom').html($(this).val()).attr('selected', 'selected');124 } else {125 select.append(select.find('option:last').clone().val('custom').html($(this).val()));126 select.find('option[value="custom"]').attr('selected', 'selected');127 }128 }129 }130 }131 })132 .addClass( "ui-widget ui-widget-content ui-corner-left" );133 134 input.data( "autocomplete" )._renderItem = function( ul, item ) {135 return $( "<li></li>" )136 .data( "item.autocomplete", item )137 .append( "<a>" + item.label + "</a>" )138 .appendTo( ul );139 };140 141 this.button = $( "<button type='button'> </button>" )142 .attr( "tabIndex", -1 )143 .attr( "title", "Show All Items" )144 .insertAfter( input )145 .button({146 icons: {147 primary: "ui-icon-triangle-1-s"148 },149 text: false150 })151 .removeClass( "ui-corner-all" )152 .addClass( "ui-corner-right ui-button-icon" )153 .click(function() {154 // close if already visible155 if ( input.autocomplete( "widget" ).is( ":visible" ) ) {156 input.autocomplete( "close" );157 return;158 }159 160 // work around a bug (likely same cause as #5265)161 $( this ).blur();162 163 // pass empty string as value to search for, displaying all results164 input.autocomplete( "search", "" );165 input.focus();166 });167 },168 169 destroy: function() {170 this.input.remove();171 this.button.remove();172 this.element.show();173 $.Widget.prototype.destroy.call( this );174 }175 });176 })( jQuery );177 /**178 * #END: Implementação do widget de input-combobox179 */180 62 winElement.find('input[name="alarmDate"]').change(function(event){ 181 63 winElement.find('input[name="alarmTime"]').attr('disabled', ( $(this).val() == "" ? 'disabled' : false));
Note: See TracChangeset
for help on using the changeset viewer.