Plugin Directory

Changeset 2149207


Ignore:
Timestamp:
09/01/2019 04:47:27 PM (6 years ago)
Author:
hitcode
Message:

4.4.6

Location:
shiftcontroller/trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • shiftcontroller/trunk/hc3/ui/filter.php

    r1855340 r2149207  
    9090
    9191    // restore tags
    92             foreach( $tags as $tag => $param ){
    93                 $element->tag( $tag, $param );
    94             }
     92            // foreach( $tags as $tag => $param ){
     93                // if( is_object($element) ){
     94                    // $element->tag( $tag, $param );
     95                // }
     96            // }
    9597        }
    9698
  • shiftcontroller/trunk/readme.txt

    r2134277 r2149207  
    6060
    6161== Changelog ==
     62
     63= 4.4.6 =
     64* Changed calendar description field to a wysiwyg editor. Also WordPress shortcodes are now processed in this field.
     65* A small change when creating multiple shifts: for example if there are 2 new shifts for 1 Sep and 1 Oct, after submit you return back to 1 Sep calendar, rather jumping forward to 1 Oct.
     66* BUG: Attempted to fix a fatal error in print view in some configurations.
    6267
    6368= 4.4.5 =
  • shiftcontroller/trunk/sh4/calendars/html/admin/view/edit.php

    r1912260 r2149207  
    6666        $inputs[] = $idView;
    6767        $inputs[] = $this->ui->makeInputText( 'title', '__Title__', $model->getTitle() )->bold();
    68         $inputs[] = $this->ui->makeInputTextarea( 'description', '__Description__', $model->getDescription() );
     68        $inputs[] = $this->ui->makeInputRichTextarea( 'description', '__Description__', $model->getDescription() )->setRows(6);
    6969
    7070        $typeOptions = array(
  • shiftcontroller/trunk/sh4/calendars/html/admin/view/new.php

    r1909721 r2149207  
    5656        $inputs = array();
    5757        $inputs[] = $this->ui->makeInputText( 'title', '__Title__' )->bold();
    58         $inputs[] = $this->ui->makeInputTextarea( 'description', '__Description__' );
     58        $inputs[] = $this->ui->makeInputRichTextarea( 'description', '__Description__' )->setRows(6);
    5959
    6060        $typeOptions = array(
  • shiftcontroller/trunk/sh4/calendars/presenter.php

    r1909721 r2149207  
    55    {
    66        $this->ui = $ui;
     7    }
     8
     9    public function presentDescription( SH4_Calendars_Model $calendar )
     10    {
     11        $return = $calendar->getDescription();
     12
     13        if( defined('WPINC') ){
     14            $return = do_shortcode( $return );
     15        }
     16
     17        return $return;
    718    }
    819
  • shiftcontroller/trunk/sh4/new/controller/confirm.php

    r1992902 r2149207  
    166166            $scheduleLink = array( 'schedule', array() );
    167167        }
    168         $scheduleLink[1]['start'] = $date;
    169168
     169        $returnToDate = $dates[0];
     170        $scheduleLink[1]['start'] = $returnToDate;
    170171
    171172        $return = array( $scheduleLink, '__New Created__' . ' [' . count($ids) . ']' );
  • shiftcontroller/trunk/sh4/new/view/calendar.php

    r2053890 r2149207  
    2626        SH4_App_Query $appQuery,
    2727        SH4_New_Query $newQuery,
     28        SH4_Calendars_Presenter $calendarsPresenter,
    2829
    2930        SH4_ShiftTypes_Presenter $shiftTypesPresenter
     
    3839        $this->appQuery = $hooks->wrap( $appQuery );
    3940        $this->newQuery = $hooks->wrap( $newQuery );
     41        $this->calendarsPresenter = $hooks->wrap( $calendarsPresenter );
    4042        $this->shiftTypesPresenter = $hooks->wrap( $shiftTypesPresenter );
    4143
     
    162164                ->tag('font-size', 4)
    163165                ;
    164             $description = $e->getDescription();
     166
     167            $description = $this->calendarsPresenter->presentDescription( $e );
    165168            if( strlen($description) ){
    166169                $thisLabel = $this->ui->makeList( array($thisLabel, $description) )
  • shiftcontroller/trunk/sh4/new/view/confirm.php

    r2053890 r2149207  
    160160        $out = array();
    161161        $calendarView = $this->calendarsPresenter->presentTitle( $calendar );
    162         $description = $calendar->getDescription();
     162
     163        $description = $this->calendarsPresenter->presentDescription( $calendar );
    163164        if( strlen($description) ){
    164165            $calendarView = $this->ui->makeList( array($calendarView, $description) )
  • shiftcontroller/trunk/sh4/schedule/assets/js/calendar.js

    r2134277 r2149207  
    7171        }
    7272
     73    // kind of trick, if it doesn't contain our 'hca=' part then skip
     74        if( ! href.includes('hca=') ){
     75            return true;
     76        }
     77
    7378        var $waiter = $details;
    7479        hc2_set_loader( $waiter );
    7580
    7681        href = hc2MakeAjaxHref( href );
    77 
    7882
    7983        jQuery.ajax({
  • shiftcontroller/trunk/sh4/schedule/html/view/day.php

    r2134277 r2149207  
    217217            // $calendarView = $this->calendarsPresenter->presentTitle( $calendar );
    218218            $calendarView = $calendar->getTitle();
     219
     220            $description = $calendar->getDescription();
     221            $description = htmlspecialchars( $description );
     222
     223            $calendarView = $this->ui->makeSpan( $calendarView )
     224                // ->tag('font-size', 4)
     225                ->addAttr( 'title', $description )
     226                ;
     227
    219228            $viewCalendars[ $calendarId ] = $calendarView;
    220229        }
     
    390399        foreach( $employees as $employee ){
    391400            $label = $employee->getTitle();
     401
     402            $description = $employee->getDescription();
     403            $description = htmlspecialchars( $description );
     404
    392405            $label = $this->ui->makeSpan( $label )
    393406                ->tag('font-size', 4)
     407                ->addAttr( 'title', $description )
    394408                ;
    395409            $viewEmployees[ $employee->getId() ] = $label;
  • shiftcontroller/trunk/sh4/schedule/html/view/month.php

    r2134277 r2149207  
    237237            // $label = $this->calendarsPresenter->presentTitle( $calendar );
    238238            $label = $calendar->getTitle();
     239
     240            $description = $calendar->getDescription();
     241            $description = htmlspecialchars( $description );
     242
     243            $label = $this->ui->makeSpan( $label )
     244                // ->tag('font-size', 4)
     245                ->addAttr( 'title', $description )
     246                ;
     247
    239248            $viewCalendars[ $calendar->getId() ] = $label;
    240249        }
     
    465474        foreach( $employees as $employee ){
    466475            $label = $employee->getTitle();
     476
     477            $description = $employee->getDescription();
     478            $description = htmlspecialchars( $description );
     479
    467480            $label = $this->ui->makeSpan( $label )
    468481                ->tag('font-size', 4)
     482                ->addAttr( 'title', $description )
    469483                ;
    470484            $viewEmployees[ $employee->getId() ] = $label;
  • shiftcontroller/trunk/sh4/schedule/html/view/week.php

    r2134277 r2149207  
    267267            // $calendarView = $this->calendarsPresenter->presentTitle( $calendar );
    268268            $calendarView = $calendar->getTitle();
     269
     270            $description = $calendar->getDescription();
     271            $description = htmlspecialchars( $description );
     272
     273            $calendarView = $this->ui->makeSpan( $calendarView )
     274                // ->tag('font-size', 4)
     275                ->addAttr( 'title', $description )
     276                ;
     277
    269278            $view_calendars[ $calendarId ] = $calendarView;
    270279        }
     
    503512        $view_employees = array();
    504513        foreach( $employees as $employee ){
     514            $description = $employee->getDescription();
     515            $description = htmlspecialchars( $description );
     516
    505517            $label = $employee->getTitle();
    506518            $label = $this->ui->makeSpan( $label )
    507519                ->tag('font-size', 4)
    508                 ;
     520                ->addAttr( 'title', $description )
     521                ;
     522
    509523            $view_employees[ $employee->getId() ] = $label;
    510524        }
  • shiftcontroller/trunk/sh4/shifts/view/zoom.php

    r2134277 r2149207  
    176176            ->tag('font-size', 4)
    177177            ;
    178         $calendarDescription = $calendar->getDescription();
     178
     179        // $calendarDescription = $calendar->getDescription();
     180        $calendarDescription = $this->calendarsPresenter->presentDescription( $calendar );
    179181        if( strlen($calendarDescription) ){
    180182            $thisView = $this->ui->makeList( array($thisView, $calendarDescription) )
  • shiftcontroller/trunk/shiftcontroller4.php

    r2134277 r2149207  
    44 * Plugin URI: http://www.shiftcontroller.com/
    55 * Description: Staff scheduling plugin
    6  * Version: 4.4.5
     6 * Version: 4.4.6
    77 * Author: hitcode.com
    88 * Author URI: http://www.shiftcontroller.com/
     
    1111*/
    1212
    13 define( 'SH4_VERSION', 445 );
     13define( 'SH4_VERSION', 446 );
    1414
    1515if (! defined('ABSPATH')) exit; // Exit if accessed directly
Note: See TracChangeset for help on using the changeset viewer.