Changeset 1377052
- Timestamp:
- 03/23/2016 02:16:27 PM (10 years ago)
- Location:
- opentickets-community-edition/trunk
- Files:
-
- 10 edited
-
assets/css/admin/ui.css (modified) (1 diff)
-
assets/css/features/calendar/calendar.css (modified) (1 diff)
-
assets/css/features/calendar/calendar.less (modified) (1 diff)
-
assets/js/admin/event-ui.js (modified) (10 diffs)
-
assets/js/admin/order/ticket-selection.js (modified) (2 diffs)
-
assets/js/utils/tools.js (modified) (4 diffs)
-
inc/core/post-type.class.php (modified) (5 diffs)
-
inc/event-area/post-type.class.php (modified) (4 diffs)
-
launcher.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
opentickets-community-edition/trunk/assets/css/admin/ui.css
r1226637 r1377052 69 69 .option-sub .bulk-edit-settings { position:absolute; top:10px; padding:1em 1.5em; background-color:#FFFFFF; border:1px solid #dddddd; z-index:800; } 70 70 71 .date-text { width:90px; }71 body .date-text { width:90px; } 72 72 .time-text { width:75px; } 73 73 -
opentickets-community-edition/trunk/assets/css/features/calendar/calendar.css
r1340883 r1377052 1 body .fc{position:relative}body .fc-bgevent{background:#f0f0f0;opacity:.3;filter:alpha(opacity=30);color:#577483;border-color:#577483}body .fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:0;border:2px solid #577483;background-color:#f0f0f0;font-weight:normal}body .fc-event-container .fc-event,body .ui-widget .fc-event{color:#577483;text-decoration:none}body .fc-event-container .fc-event:hover{border-color:#577483;background-color:#577483;color:#ffffff}body .fc-event-container .fc-event.status-hidden{border:1px dashed #214e63;opacity:0.5;filter:alpha(opacity=50)}body .fc-event-container .fc-event.status-private{border:1px dashed #ffffff;font-style:italic;color:#c0c0c0}body .fc-event .event-item{padding:0.2em 0 0.2em 0.2em}body .fc-event.in-the-past,body .fc-event.in-the-past:hover,body .ui-widget .fc-event.in-the-past{color:#bbbbbb;background-color:#ffffff;border-color:#bbbbbb;text-decoration:none}body .fc-event.in-the-past:hover{border-color:#bbbbbb;background-color:#ffffff;color:#bbbbbb}body .fc-event[href],body .fc-event.fc-draggable{cursor:pointer}body .fc-not-allowed,body .fc-not-allowed .fc-event{cursor:not-allowed}body .fc-event .fc-bg{z-index:1;background:#f0f0f0;opacity:.25;filter:alpha(opacity=25)}body .fc-event.in-the-past .fc-bg{z-index:1;background:#ffffff;opacity:.25;filter:alpha(opacity=25)}body .fc-event .fc-time{font-weight:700}body .fc-event .fc-title{text-decoration:underline;font-weight:500}body .fc-event .fc-availability{font-style:italic;font-weight:300;font-size:0.8em}body .fc-event .fc-img img{max-width:100%;height:auto;width:auto}body .fc-month-view .fc-event .fc-img{padding-top:3px}body .fc-basicDay-view .fc-event .fc-img{display:block}body .fc-basicDay-view .fc-event .fc-img img{max-width:100%}body .fc-event .fc-clear::before,body .fc-event .fc-clear::after{content:" ";display:block;height:0;overflow:hidden}body .fc-event .fc-clear::after{clear:both}body .fc .fc-view table{border:0 none}body .fc .fc-head-container{border:0 none}body .fc .fc-head table,body .fc .fc-head td,body .fc .fc-head th{border:0 none}body .fc .fc-body{border:1px solid #ddd;border-left:0 none;border-top:0 none}body .fc .fc-body > tr > .fc-widget-content{border:0 none}body .fc .fc-axis.fc-widget-header,body .fc .fc-day-header{border-color:#555;background-color:#555;color:#f8f8f8;text-align:center;font-weight:700;text-transform:uppercase;font-size:13px;line-height:1.9em}body .fc .fc-view-container .fc-day-number{border-color:#aaa;background-color:#aaa;color:#fff;font-size:11px;font-weight:700;line-height:1.6;padding:0 4px;text-align:left}body .fc .fc-view-container .fc-day-number.fc-today{background-color:#577483}body .fc .fc-today{background-color:#E3EDF9}body .fc .fc-content-skeleton td{border-color:#aaa}body .fc .fc-toolbar > .fc-center > *{float:none}body .fc .fc-toolbar > .fc-center > div{float:none}body .fc .fc-toolbar > .fc-center > h2{float:none;margin-bottom:6px}body .fc .fc-toolbar .fc-left,body .fc .fc-toolbar .fc-right{padding-top:34px}body .fc .fc-toolbar.fc-bottom{padding-top:20px}body .fc .fc-toolbar.fc-bottom .fc-left,body .fc .fc-toolbar.fc-bottom .fc-right{padding-top:0}body .fc .goto-form{text-align:center;padding:0 0 8px}body .fc .goto-form select{text-align:left}body .fc-unthemed .fc-divider,body .fc-unthemed .fc-popover,body .fc-unthemed .fc-row,body .fc-unthemed tbody,body .fc-unthemed td,body .fc-unthemed th,body .fc-unthemed thead{border-color:#ccc}body .fc .fc-day-grid-event{margin:0 3px 3px}body .fc tr:first-child > td > .fc-day-grid-event{margin-top:3px}body .fc .fc-row{padding-bottom:7px}body .fc .fc-head .fc-row{padding-bottom:0}body .fc td,body .fc th{border-top-width:0}body .fc .fc-slats td,body .fc .fc-slats th{border-top-width:1px}body select.fc-state-default{box-sizing:border-box;cursor:pointer;font-size:1em;height:2.1em;margin:0;padding:0 0.6em;white-space:nowrap;width:auto}body .fc .loading-overlay-wrap{position:absolute;top:0;bottom:0;left:0;right:0;width:auto;height:auto;z-index:8999}body .fc .loading-overlay{position:absolute;top:-1em;bottom:-1em;left:-1em;right:-1em;width:auto;height:auto;background-color:rgba(0,0,0,0.5)}body .fc .loading-message{position:absolute;top:50%;left:50%;color:#fff;font-weight:700;font-style:italic;font-size:32px;transform:translate(-50%,-50%)}@media only screen and (min-width: 450px){body .fc-basicDay-view .fc-event .fc-img{float:left;clear:none;margin:0 8px 5px 0}body .fc-basicDay-view .fc-event .fc-img img{max-width:300px}}1 body .fc{position:relative}body .fc-bgevent{background:#f0f0f0;opacity:.3;filter:alpha(opacity=30);color:#577483;border-color:#577483}body .fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:0;border:2px solid #577483;background-color:#f0f0f0;font-weight:normal}body .fc-event-container .fc-event,body .ui-widget .fc-event{color:#577483;text-decoration:none}body .fc-event-container .fc-event:hover{border-color:#577483;background-color:#577483;color:#ffffff}body .fc-event-container .fc-event.status-hidden{border:1px dashed #214e63;opacity:0.5;filter:alpha(opacity=50)}body .fc-event-container .fc-event.status-private{border:1px dashed #ffffff;font-style:italic;color:#c0c0c0}body .fc-event .event-item{padding:0.2em 0 0.2em 0.2em}body .fc-event.in-the-past,body .fc-event.in-the-past:hover,body .ui-widget .fc-event.in-the-past{color:#bbbbbb;background-color:#ffffff;border-color:#bbbbbb;text-decoration:none}body .fc-event.in-the-past:hover{border-color:#bbbbbb;background-color:#ffffff;color:#bbbbbb}body .fc-event[href],body .fc-event.fc-draggable{cursor:pointer}body .fc-not-allowed,body .fc-not-allowed .fc-event{cursor:not-allowed}body .fc-event .fc-bg{z-index:1;background:#f0f0f0;opacity:.25;filter:alpha(opacity=25)}body .fc-event.in-the-past .fc-bg{z-index:1;background:#ffffff;opacity:.25;filter:alpha(opacity=25)}body .fc-event .fc-time{font-weight:700}body .fc-event .fc-title{text-decoration:underline;font-weight:500}body .fc-event .fc-availability{font-style:italic;font-weight:300;font-size:0.8em}body .fc-event .fc-img img{max-width:100%;height:auto;width:auto}body .fc-month-view .fc-event .fc-img{padding-top:3px}body .fc-basicDay-view .fc-event .fc-img{display:block}body .fc-basicDay-view .fc-event .fc-img img{max-width:100%}body .fc-event .fc-clear::before,body .fc-event .fc-clear::after{content:" ";display:block;height:0;overflow:hidden}body .fc-event .fc-clear::after{clear:both}body .fc .fc-view table{border:0 none}body .fc .fc-head-container{border:0 none}body .fc .fc-head table,body .fc .fc-head td,body .fc .fc-head th{border:0 none}body .fc .fc-body{border:1px solid #ddd;border-left:0 none;border-top:0 none}body .fc .fc-body > tr > .fc-widget-content{border:0 none}body .fc .fc-axis.fc-widget-header,body .fc .fc-day-header{border-color:#555;background-color:#555;color:#f8f8f8;text-align:center;font-weight:700;text-transform:uppercase;font-size:13px;line-height:1.9em}body .fc .fc-view-container .fc-day-number{border-color:#aaa;background-color:#aaa;color:#fff;font-size:11px;font-weight:700;line-height:1.6;padding:0 4px;text-align:left}body .fc .fc-view-container .fc-day-number.fc-today{background-color:#577483}body .fc .fc-today{background-color:#E3EDF9}body .fc .fc-content-skeleton td{border-color:#aaa}body .fc .fc-toolbar > .fc-center > *{float:none}body .fc .fc-toolbar > .fc-center > div{float:none}body .fc .fc-toolbar > .fc-center > h2{float:none;margin-bottom:6px}body .fc .fc-toolbar.fc-bottom{padding-top:20px}body .fc .fc-toolbar.fc-bottom .fc-left,body .fc .fc-toolbar.fc-bottom .fc-right{padding-top:0}body .fc .goto-form{text-align:center;padding:0 0 8px}body .fc .goto-form select{text-align:left}body .fc-unthemed .fc-divider,body .fc-unthemed .fc-popover,body .fc-unthemed .fc-row,body .fc-unthemed tbody,body .fc-unthemed td,body .fc-unthemed th,body .fc-unthemed thead{border-color:#ccc}body .fc .fc-day-grid-event{margin:0 3px 3px}body .fc tr:first-child > td > .fc-day-grid-event{margin-top:3px}body .fc .fc-row{padding-bottom:7px}body .fc .fc-head .fc-row{padding-bottom:0}body .fc td,body .fc th{border-top-width:0}body .fc .fc-slats td,body .fc .fc-slats th{border-top-width:1px}body select.fc-state-default{box-sizing:border-box;cursor:pointer;font-size:1em;height:2.1em;margin:0;padding:0 0.6em;white-space:nowrap;width:auto}body .fc .loading-overlay-wrap{position:absolute;top:0;bottom:0;left:0;right:0;width:auto;height:auto;z-index:8999}body .fc .loading-overlay{position:absolute;top:-1em;bottom:-1em;left:-1em;right:-1em;width:auto;height:auto;background-color:rgba(0,0,0,0.5)}body .fc .loading-message{position:absolute;top:50%;left:50%;color:#fff;font-weight:700;font-style:italic;font-size:32px;transform:translate(-50%,-50%)}@media only screen and (min-width: 450px){body .fc-basicDay-view .fc-event .fc-img{float:left;clear:none;margin:0 8px 5px 0}body .fc-basicDay-view .fc-event .fc-img img{max-width:300px}} -
opentickets-community-edition/trunk/assets/css/features/calendar/calendar.less
r1340883 r1377052 100 100 body .fc .fc-toolbar > .fc-center > div { float:none; } 101 101 body .fc .fc-toolbar > .fc-center > h2 { float:none; margin-bottom:6px; } 102 body .fc .fc-toolbar .fc-left,103 body .fc .fc-toolbar .fc-right { padding-top:34px; } 102 /*body .fc .fc-toolbar .fc-left, 103 body .fc .fc-toolbar .fc-right { padding-top:34px; } */ 104 104 body .fc .fc-toolbar.fc-bottom { padding-top:20px; } 105 105 body .fc .fc-toolbar.fc-bottom .fc-left, -
opentickets-community-edition/trunk/assets/js/admin/event-ui.js
r1369465 r1377052 1 1 var QS = QS || {}; 2 2 QS.EventUI = (function($, undefined) { 3 var qt = QS.Tools, S = $.extend( true, { frmts:{} }, _qsot_event_ui_settings ); 3 var qt = QS.Tools, 4 S = $.extend( true, { frmts:{} }, _qsot_event_ui_settings ), 5 new_post_id = -1; 4 6 5 7 function frmt( str ) { … … 137 139 title: data['title'], 138 140 allDay: false, 139 editable: true, 140 post_id: -1, 141 editable: true 141 142 }; 142 143 var events = []; … … 388 389 }; 389 390 391 // remove an item from the calendar, based on the clicking of the red X 390 392 function remove(e) { 391 393 e.preventDefault(); 392 var self = $( this);393 var scope = self.closest('[rel=item]');394 var ev = scope.data('event');394 var self = $( this ), 395 scope = self.closest( '[rel=item]' ), 396 ev = scope.data( 'event' ); 395 397 scope.remove(); 396 398 t.removeEvents(ev); … … 413 415 +'</div>' 414 416 +'</div>').data('event', ev).click(highlight); 415 ele.find( '[rel=remove]').click(remove);417 ele.find( '[rel=remove]' ).click( remove ); 416 418 t.callback('event_list_item', [ele]); 417 419 if (ele.length) … … 524 526 if (typeof tmpl == 'function') tmpl = tmpl(); 525 527 else tmpl = $(tmpl); 526 tmpl.find('.'+self.fctm+'-event-time').html(element.find('.'+self.fctm+'-event-time').html()); 527 tmpl.find('.'+self.fctm+'-event-title').html(element.find('.'+self.fctm+'-event-title').html()); 528 tmpl.find('.'+self.fctm+'-capacity').html('('+_toNum(ev.capacity)+')'); 529 tmpl.find('.'+self.fctm+'-visibility').html('['+QS.ucFirst(ev.visibility)+']'); 530 tmpl.find('[rel=remove]').click(function() { self.removeEvents([ev]); }); 528 var item = tmpl.clone(); 529 item.find('.'+self.fctm+'-event-time').html(element.find('.'+self.fctm+'-event-time').html()); 530 item.find('.'+self.fctm+'-event-title').html(element.find('.'+self.fctm+'-event-title').html()); 531 item.find('.'+self.fctm+'-capacity').html('('+_toNum(ev.capacity)+')'); 532 item.find('.'+self.fctm+'-visibility').html('['+QS.ucFirst(ev.visibility)+']'); 533 item.find( '[rel=remove]' ).data( 'event', ev ).click( function() { self.removeEvents( [ $( this ).data( 'event' ) ] ); } ); 531 534 element.empty(); 532 tmpl.appendTo(element);535 item.appendTo(element); 533 536 } else { 534 537 $('<span class="'+self.fctm+'-capacity"> ('+_toNum(ev.capacity)+') </span>') … … 588 591 } 589 592 593 590 594 // aggregate the args we will use for the event render on the calendar 591 595 args = $.extend( { … … 593 597 visibility: 'public', 594 598 capacity: 0, 595 post_id: -1599 post_id: new_post_id-- 596 600 }, obj ); 597 601 … … 714 718 715 719 // find the header container that we are adding the buttons to 716 this.elements.header_center = view.el.closest( '.' + tm ).find( '.' + tm + '-toolbar .fc-center' ); 720 this.elements.header = $( '.qsot-action-toolbar' ); 721 if ( ! this.elements.header.length ) { 722 this.elements.orig_header = view.el.closest( '.' + tm ).find( '.' + tm + '-toolbar' ); 723 this.elements.header = $( '<div class="qsot-action-toolbar ' + tm + '-toolbar"></div>' ).insertBefore( this.elements.orig_header ); 724 } 725 this.elements.header_center = $( '<div class="' + tm + '-center"></div>' ).appendTo( this.elements.header ); 717 726 718 727 // add the new evetn date button, which when clicked, opens the new event date form 719 this.addButton( 'new_event_btn', qt.str( 'New Event Date', S ), [ 'togvis' ], { tar:'.option-sub[rel=add]', scope:'.events-ui' } ).click( function() { 720 var scope = $( this ).closest( $( this ).attr( 'scope' ) ), tar = $( $( this ).attr( 'tar' ), scope ); 721 } ); 728 this.addButton( 'new_event_btn', 'New Event Date', [ 'togvis', 'button', 'button-primary' ], { tar:'.option-sub[rel=add]', scope:'.events-ui' } ).appendTo( this.elements.header_center ); 722 729 723 730 // allow others to add buttons here as well … … 725 732 }, 726 733 727 addButton: function(name, label, classes, attr) { 728 if (typeof this.elements.buttons[name] == 'undefined' || this.elements.buttons[name] == null) { 729 var tm = this.fctm; 730 var attr = attr || {}; 731 var classes = classes || ''; 732 classes = typeof classes == 'object' ? classes.join(' ') : ''; 733 this.elements.buttons[name] = $('<span class="button-primary '+tm+'-button '+tm+'-button-'+name+' '+tm+'-state-default '+tm+'-corner-left '+tm+'-corner-right '+classes+'">' 734 +'<span class="'+tm+'-button-inner">' 735 +'<span class="'+tm+'-button-content">'+label+'</span>' 736 +'<span class="'+tm+'-button-effect"><span></span></span>' 737 +'</span>' 738 +'</span>').attr(attr).appendTo(this.elements.header_center).hover( 739 function() { $(this).not('.' + tm + '-state-active').not('.' + tm + '-state-disabled').addClass(tm + '-state-hover'); }, 740 function() { $(this).removeClass(tm + '-state-hover').removeClass(tm + '-state-down'); } 741 ).click(function() { 742 var self = $(this); 743 if (self.hasClass(tm + '-state-active')) self.removeClass(tm + '-state-active'); 744 else self.addClass(tm + '-state-active'); 745 }); 746 } 747 return this.elements.buttons[name]; 734 // create a button and return it 735 addButton: function( name, label, classes, attr ) { 736 // if the button does not already exist, create it 737 if ( ! qt.is( this.elements.buttons[ name ] ) ) { 738 // normalize the input 739 var tm = this.fctm, 740 attr = attr || {}, 741 classes = classes || ''; 742 classes = qt.isA( classes ) ? classes : ( qt.isO( classes ) ? '' : classes.split( /\s+/ ) ); 743 744 // add some default classes 745 classes.concat( [ 746 tm + '-button', 747 tm + '-button-' + name, 748 tm + '-state-default', 749 tm + '-corner-left', 750 tm + '-corner-right' 751 ] ); 752 classes = classes.join( ' ' ); 753 754 // create the button 755 this.elements.buttons[ name ] = $( '<span>' 756 + '<span class="' + tm + '-button-inner">' 757 + '<span class="' + tm + '-button-content">' + qt.str( label, S ) + '</span>' 758 + '<span class="' + tm + '-button-effect"><span></span></span>' 759 + '</span>' 760 + '</span>').addClass( classes ).attr( attr ) 761 // handle the visual change, using the fc state css, when hovered 762 .hover( 763 function() { $( this ).not( '.' + tm + '-state-active' ).not( '.' + tm + '-state-disabled' ).addClass( tm + '-state-hover' ); }, 764 function() { $( this ).removeClass( tm + '-state-hover' ).removeClass( tm + '-state-down' ); } 765 ) 766 // handle the visual changes upon click of the button 767 .click( function() { 768 var self = $( this ); 769 if ( self.hasClass( tm + '-state-active' ) ) 770 self.removeClass( tm + '-state-active' ); 771 else 772 self.addClass( tm + '-state-active' ); 773 } ); 774 } 775 776 // returned the created or cached element 777 return this.elements.buttons[ name ]; 748 778 }, 749 779 750 780 beforeFormSubmit: function(form) { 751 var events = this.calendar.fullCalendar('clientEvents') ;752 var defaults = {753 post_id:-1,754 status:'pending',755 visibility:'public',756 password:'',757 pub_date:'',758 purchase_limit: 0,759 capacity:0760 };781 var events = this.calendar.fullCalendar('clientEvents'), 782 post_id_dec = -1, 783 defaults = { 784 status:'pending', 785 visibility:'public', 786 password:'', 787 pub_date:'', 788 purchase_limit: 0, 789 capacity:0 790 }; 761 791 this.callback( 'before-submit-defaults', [ defaults ] ); 762 792 … … 775 805 capacity: events[i].capacity 776 806 }; 777 ev = $.extend( {}, defaults, ev);807 ev = $.extend( { post_id:post_id_dec-- }, defaults, ev ); 778 808 this.callback('before_submit_event_item', [ ev, events[i], defaults ]); 779 809 var txt = JSON.stringify(ev); -
opentickets-community-edition/trunk/assets/js/admin/order/ticket-selection.js
r1369465 r1377052 147 147 true_dialog.qsUnblock(); 148 148 // show any passed errors, or a default error 149 me.ui.dialog_msgs( qt.isA( r.e ) ? r.e : [ qs._str( 'There was a problem adding thos tickets.', me.S ) ], 'error' );149 me.ui.dialog_msgs( qt.isA( r.e ) ? r.e : [ qs._str( 'There was a problem adding those tickets.', me.S ) ], 'error' ); 150 150 return; 151 151 } … … 179 179 true_dialog.qsUnblock(); 180 180 // show any passed errors, or a default error 181 me.ui.dialog_msgs( qt.isA( r.e ) ? r.e : [ qs._str( 'There was a problem adding thos tickets.', me.S ) ], 'error' );181 me.ui.dialog_msgs( qt.isA( r.e ) ? r.e : [ qs._str( 'There was a problem adding those tickets.', me.S ) ], 'error' ); 182 182 return; 183 183 } -
opentickets-community-edition/trunk/assets/js/utils/tools.js
r1367916 r1377052 128 128 return qt; 129 129 })(jQuery, QS, QS.Tools, window, document); 130 131 /* focus checker. when a specific element receives focus, check an adjacent checkbox or radio button */ 132 ( function( $, qt ) { 133 $( document ).on( 'focus', '.focus-check', function() { 134 var me = $( this ), 135 scope = me.data( 'scope' ) || false, 136 target = me.data( 'target' ) || false, ele; 137 138 // if we do not have the needed data, then bail 139 if ( ! scope || ! target ) 140 return; 141 142 // if the supplied data does not point to an actual element, bail 143 ele = $( scope ).find( target ); 144 if ( ! ele.length ) 145 return; 146 147 ele.prop( 'checked', true ); 148 } ); 149 } )( jQuery, QS.Tools ); 130 150 131 151 QS.popMediaBox = (function($, qt) { … … 272 292 // create a display version above the hidden on 273 293 var display = $( '<input type="text" />' ).insertBefore( me ).attr( { id:( me.attr( 'id' ) || me.attr( 'name' ) ) + '-display', role:role + '-display' } ) 274 .addClass( me.attr( 'class' ).replace( new RegExp( selector.replace( /^\.#/, '' ), 'g' ), '' ) );294 .addClass( me.attr( 'class' ).replace( new RegExp( selector.replace( /^\.#/, '' ), 'g' ), '' ) ); 275 295 me.data( 'display', display ); 276 296 … … 308 328 case 'from': 309 329 args.onSelect = function( str, obj ) { 310 var d = display.datepicker( 'getDate' ), 311 other = scope.find( '[role="to"]' ).data( 'display' ), 312 other_d = other.length ? other.datepicker( 'getDate' ) : d 313 314 if ( other.length && d && other_d && d.getTime() > other_d.getTime() ) { 315 other.datepicker( 'setDate', d ); 316 } 330 var d; 331 scope.find( '[role="to"]' ).each( function( ind ) { 332 var other = $( this ).data( 'display' ), 333 other_d = other.length ? other.datepicker( 'getDate' ) : d 334 335 d = display.datepicker( 'getDate' ); 336 337 if ( other.length && d && other_d && d.getTime() > other_d.getTime() ) { 338 other.datepicker( 'setDate', d ); 339 } 340 } ); 341 342 var link_with = me.data( 'link-with' ) || false; 343 link_with = link_with ? scope.find( link_with ).add( link_with ) : false; 344 // update all 'link with' datepickers 345 if ( link_with ) 346 link_with.each( function() { 347 if ( ! $( this ).hasClass( 'has-datepicker' ) ) 348 return; 349 var display = $( this ).data( 'display' ); 350 if ( qt.isO( display ) && display.length ) { 351 display.datepicker( 'setDate', d ); 352 display.datepicker( 'option', 'onSelect' )( d ); 353 } 354 } ); 317 355 }; 318 356 break; … … 320 358 case 'to': 321 359 args.onSelect = function( str, obj ) { 322 var d = display.datepicker( 'getDate' ), 323 other = scope.find( '[role="from"]' ).data( 'display' ), 324 other_d = other.length ? other.datepicker( 'getDate' ) : d 325 326 if ( other.length && d && other_d && d.getTime() < other_d.getTime() ) { 327 other.datepicker( 'setDate', d ); 328 } 360 var d; 361 scope.find( '[role="from"]' ).each( function() { 362 var other = $( this ).data( 'display' ), 363 other_d = other.length ? other.datepicker( 'getDate' ) : d 364 365 d = display.datepicker( 'getDate' ); 366 367 if ( other.length && d && other_d && d.getTime() < other_d.getTime() ) { 368 other.datepicker( 'setDate', d ); 369 } 370 } ); 371 372 var link_with = me.data( 'link-with' ) || false; 373 link_with = link_with ? scope.find( link_with ).add( link_with ) : false; 374 // update all 'link with' datepickers 375 if ( link_with ) 376 link_with.each( function() { 377 if ( ! $( this ).hasClass( 'has-datepicker' ) ) 378 return; 379 var display = $( this ).data( 'display' ); 380 if ( qt.isO( display ) && display.length ) { 381 display.datepicker( 'setDate', d ); 382 display.datepicker( 'option', 'onSelect' )( d ); 383 } 384 } ); 329 385 }; 330 386 break; -
opentickets-community-edition/trunk/inc/core/post-type.class.php
r1373382 r1377052 1931 1931 1932 1932 public static function mb_event_date_time_settings($post, $mb) { 1933 $now = current_time( 'timestamp' ); 1934 $end = strtotime( '+1 hour', $now ); 1935 $one_week = strtotime( '+1 week', $now ); 1933 1936 ?> 1934 1937 <div class="<?php echo self::$o->pre ?>event-date-time-wrapper events-ui"> … … 1939 1942 <tbody> 1940 1943 <tr> 1941 <td width=" 50%">1944 <td width="35%"> 1942 1945 <h4><?php _e('Basic Settings','opentickets-community-edition') ?></h4> 1943 1946 <div class="date-time-block subsub"> 1944 1947 1945 < ?php $now = current_time( 'timestamp' ) ?>1946 <input type="text" class="use-i18n-datepicker date-text" name="start-date" scope="td"data-display-format="<?php echo esc_attr( __( 'mm-dd-yy', 'opentickets-community-edition' ) ) ?>"1947 value="<?php echo date( __( 'm-d-Y', 'opentickets-community-edition' ), $now ) ?>" title="<?php _e('Start Date','opentickets-community-edition') ?>" />1948 <input type="text" class="use-i18n-datepicker date-text" name="start-date" scope="td" data-link-with=".repeat-options [role='from']" 1949 data-display-format="<?php echo esc_attr( __( 'mm-dd-yy', 'opentickets-community-edition' ) ) ?>" 1950 value="<?php echo date( __( 'm-d-Y', 'opentickets-community-edition' ), $now ) ?>" title="<?php _e('Start Date','opentickets-community-edition') ?>" role="from" /> 1948 1951 <input type="text" class="time-text" name="start-time" value="<?php echo date(__('h:ia','opentickets-community-edition'), $now) ?>" title="<?php _e('Start Time','opentickets-community-edition') ?>" /> 1949 1952 1950 1953 <?php _e('to','opentickets-community-edition') ?><br/> 1951 1954 1952 < ?php $end = strtotime('+1 hour', $now); ?>1953 <input type="text" class="use-i18n-datepicker date-text" name="end-date" scope="td"data-display-format="<?php echo esc_attr( __( 'mm-dd-yy', 'opentickets-community-edition' ) ) ?>"1954 value="<?php echo date( __( 'm-d-Y', 'opentickets-community-edition' ), $end ) ?>" title="<?php _e('End Date','opentickets-community-edition') ?>" />1955 <input type="text" class="use-i18n-datepicker date-text" name="end-date" scope="td" data-link-with=".repeat-options [role='from']" 1956 data-display-format="<?php echo esc_attr( __( 'mm-dd-yy', 'opentickets-community-edition' ) ) ?>" 1957 value="<?php echo date( __( 'm-d-Y', 'opentickets-community-edition' ), $end ) ?>" title="<?php _e('End Date','opentickets-community-edition') ?>" role="to" /> 1955 1958 <input type="text" class="time-text" name="end-time" value="<?php echo date(__('h:ia','opentickets-community-edition'), $end) ?>" title="<?php _e('End Time','opentickets-community-edition') ?>" /> 1956 1959 … … 2033 2036 <th><?php _e('Starts on','opentickets-community-edition') ?>:</th> 2034 2037 <td> 2035 <input type="text" class="widefat date-text use-i18n-datepicker" name="repeat-starts" scope="td" data-display-format="<?php echo esc_attr( __( 'mm-dd-yy', 'opentickets-community-edition' ) ) ?>" 2036 value="<?php echo esc_attr( date( __( 'm-d-Y', 'opentickets-community-edition' ), $now ) ) ?>" /> 2038 <input type="text" class="widefat date-text use-i18n-datepicker ends-on" name="repeat-starts" scope=".repeat-options" 2039 data-display-format="<?php echo esc_attr( __( 'mm-dd-yy', 'opentickets-community-edition' ) ) ?>" 2040 value="<?php echo esc_attr( date( __( 'm-d-Y', 'opentickets-community-edition' ), $now ) ) ?>" role="from" /> 2037 2041 </td> 2038 2042 </tr> … … 2047 2051 <span class="cb-text"><?php _e('On','opentickets-community-edition') ?>:</span> 2048 2052 </span> 2049 <input type="text" class="widefat date-text use-datepicker" name="repeat-ends-on-display" real="[name='repeat-ends-on']" scope="td" 2050 frmt="<?php echo esc_attr( __( 'mm-dd-yy', 'opentickets-community-edition' ) ) ?>" 2051 value="<?php echo date( __( 'm-d-Y', 'opentickets-community-edition' ), $now ) ?>" /> 2052 <input type="hidden" name="repeat-ends-on" value="<?php echo date( __('Y-m-d', 'opentickets-community-edition' ), $now ) ?>" /> 2053 <input type="text" class="widefat date-text use-i18n-datepicker" name="repeat-ends-on" scope=".repeat-options" 2054 data-display-format="<?php echo esc_attr( __( 'mm-dd-yy', 'opentickets-community-edition' ) ) ?>" 2055 value="<?php echo esc_attr( date( __( 'm-d-Y', 'opentickets-community-edition' ), $one_week ) ) ?>" role="to" /> 2053 2056 </li> 2054 2057 <li> … … 2057 2060 <span class="cb-text"><?php _e('After','opentickets-community-edition') ?>:</span> 2058 2061 </span> 2059 <input type="number" class="widefat date-text " name="repeat-ends-after" value="15" />2062 <input type="number" class="widefat date-text focus-check" data-scope="li" data-target="input[type='radio']" name="repeat-ends-after" value="15" /> 2060 2063 <span> <?php _e('occurences','opentickets-community-edition') ?></span> 2061 2064 </li> -
opentickets-community-edition/trunk/inc/event-area/post-type.class.php
r1367916 r1377052 106 106 // during transitions of order status (and order creation), we need to perform certain operations. we may need to confirm tickets, or cancel them, depending on the transition 107 107 add_action( 'woocommerce_checkout_update_order_meta', array( &$this, 'update_order_id' ), 100, 2 ); 108 //add_action( 'woocommerce_order_status_changed', array( &$this, 'order_status_changed' ), 100, 3 );108 add_action( 'woocommerce_order_status_changed', array( &$this, 'order_status_changed' ), 100, 3 ); 109 109 //add_action( 'woocommerce_order_status_changed', array( &$this, 'order_status_changed_pending' ), 101, 3 ); 110 110 add_action( 'woocommerce_order_status_changed', array( &$this, 'order_status_changed_cancel' ), 102, 3 ); … … 128 128 129 129 // action to update the total purchases for an event 130 add_action( 'qsot-update-event-purchases', array( &$this, 'update_event_purchases' ), 2000, 1);130 add_action( 'qsot-update-event-purchases', array( &$this, 'update_event_purchases' ), 2000, 2 ); 131 131 add_action( 'save_post', array( &$this, 'save_post_update_event_purchases' ), PHP_INT_MAX, 3 ); 132 132 … … 1023 1023 } 1024 1024 1025 /* 1026 // when the order status changes, change the status of the order tickets 1025 // when the order status changes, change make sure to update the ticket purchase count 1027 1026 public function order_status_changed( $order_id, $old_status, $new_status ) { 1028 // if the status is a status that should have confirmed tickets, then .... make them confirmed 1029 if ( ! in_array( $new_status, apply_filters( 'qsot-zoner-cancelled-statuses', array( 'cancelled' ) ) ) ) { 1030 //if ( in_array( $new_status, apply_filters( 'qsot-zoner-confirmed-statuses', array( 'on-hold', 'processing', 'completed' ) ) ) ) { 1027 // if the status is a status that should have it's count, counted, then do so 1028 if ( in_array( $new_status, apply_filters( 'qsot-zoner-confirmed-statuses', array( 'on-hold', 'processing', 'completed' ) ) ) ) { 1031 1029 // load the order 1032 1030 $order = wc_get_order( $order_id ); 1031 1032 // container for all the event ids that need an update 1033 $updates = array(); 1033 1034 1034 1035 // cycle through the order items, and update all the ticket items to confirmed … … 1038 1039 continue; 1039 1040 1040 // get the event, area_type and zoner for this item 1041 $event = get_post( $item['event_id'] ); 1042 $event_area = apply_filters( 'qsot-event-area-for-event', false, $event ); 1043 $area_type = is_object( $event_area ) ? $event_area->area_type : null; 1044 1045 // if any of the data is missing, the skip this item 1046 if ( ! is_object( $event ) || ! is_object( $event_area ) || ! is_object( $area_type ) ) 1047 continue; 1048 1049 // have the event_area determine how to update the order item info in the ticket table 1050 $result = $area_type->confirm_tickets( $item, $item_id, $order, $event, $event_area ); 1051 1052 // notify externals of the change 1053 do_action( 'qsot-confirmed-ticket', $order, $item, $item_id, $result ); 1041 // tally this ticket's amount, grouping by event_id 1042 $updates[ $item['event_id'] ] = 1; 1054 1043 } 1055 } 1056 1057 $event_ids = array(); 1058 $order = wc_get_order( $order_id ); 1059 // update the total purchases for each event on the order 1060 foreach ( $order->get_items() as $item_id => $item ) 1061 if ( isset( $item['event_id'] ) ) 1062 $event_ids[ $item['event_id'] ] = 1; 1063 1064 foreach ( $event_ids as $event_id => $__ ) 1065 do_action( 'qsot-update-event-purchases', $event_id ); 1066 } 1067 */ 1044 1045 // update the counts for all events that had tickets purchased 1046 foreach ( $updates as $event_id => $_ ) 1047 do_action( 'qsot-update-event-purchases', $event_id ); 1048 } 1049 } 1068 1050 1069 1051 /* -
opentickets-community-edition/trunk/launcher.php
r1373382 r1377052 4 4 * Plugin URI: http://opentickets.com/ 5 5 * Description: Event Management and Online Ticket Sales Platform 6 * Version: 2.2. 46 * Version: 2.2.5 7 7 * Author: Quadshot Software LLC 8 8 * Author URI: http://quadshot.com/ … … 54 54 'fctm' => 'fc', 55 55 'always_reserve' => 0, 56 'version' => '2.2. 4',56 'version' => '2.2.5', 57 57 'min_wc_version' => '2.4.12', 58 58 'core_post_type' => 'qsot-event', -
opentickets-community-edition/trunk/readme.txt
r1373382 r1377052 171 171 172 172 == Changelog == 173 174 = 2.2.5 - Mar/23/2016 = 175 * [tweak] cleaned up the event repetition interface so that it is more userfriendly now 176 * [tweak] moved 'new event date' button to be centered with calendar contents 177 * [tweak] adjusted calendar styling to fix better on the page, and look better 178 * [tweak] fixed calendar syncing while adding new events, which prevents weird new event start date in some cases 179 * [fix] repaired update of '_purchases_ea' meta key 180 * [fix] corrected some typos in error messages 181 * [fix] repaired 'red Xs' on the admin edit event calendar, so that it no longer removes all events in some cases 173 182 174 183 = 2.2.4 - Mar/17/2016 =
Note: See TracChangeset
for help on using the changeset viewer.