File

src/modules/firetask/components/ft-tasks-list/ft-tasks-list.ts

Description

Listing Tasks

Example

Metadata

selector ft-tasks-list
templateUrl ft-tasks-list.html

Index

Properties
Methods

Constructor

constructor(events: Events, navCtrl: NavController, session: FtSessionProvider, alert: AlertController, storage: Storage, zone: NgZone, tasks: FtTasksProvider, admob: FtAdmobProvider, platform: Platform, loading: LoadingController)
Parameters :
Name Type Optional Description
events Events
navCtrl NavController
session FtSessionProvider
alert AlertController
storage Storage
zone NgZone
tasks FtTasksProvider
admob FtAdmobProvider
platform Platform
loading LoadingController

Methods

Private bootstrap
bootstrap(shouldShowLoading: boolean)

Initialization

Parameters :
Name Type Optional Description
shouldShowLoading boolean
Returns : void
Public delete
delete(dayIndex: number, taskIndex: number, data?: FtTaskInterface)

Removes a Task from database and storage

Parameters :
Name Type Optional Description
dayIndex number
taskIndex number
data FtTaskInterface true
Returns : void
Public detail
detail(dayIndex: number, taskIndex: number, data?: FtTaskInterface)

Call task edition screen

Parameters :
Name Type Optional Description
dayIndex number
taskIndex number
data FtTaskInterface true
Returns : void
ngOnDestroy
ngOnDestroy()

Turn off subscribers

Returns : void
Public nl2br
nl2br(value: string)

Converts new line to

Parameters :
Name Type Optional Description
value string
Returns : string

Properties

Public admob
admob: FtAdmobProvider
Type : FtAdmobProvider
Public alert
alert: AlertController
Type : AlertController
Public events
events: Events
Type : Events
Public loading
loading: LoadingController
Type : LoadingController
Public navCtrl
navCtrl: NavController
Type : NavController
Public platform
platform: Platform
Type : Platform
Public session
session: FtSessionProvider
Type : FtSessionProvider
Public storage
storage: Storage
Type : Storage
subscribers
subscribers: any[]
Type : any[]
Public tasks
tasks: FtTasksProvider
Type : FtTasksProvider
Public zone
zone: NgZone
Type : NgZone
<div class="{{day.name}}" *ngFor="let day of tasks.items; let dayIndex = index">
  <ion-list>
    <ion-list-header>
      {{day.name}}
    </ion-list-header>
    <ion-item-sliding *ngFor="let task of day.tasks; let taskIndex = index" style="margin-top: -2px;">
      <ion-card ion-item>
        <ion-card-header>
          <button (tap)="detail(dayIndex, taskIndex, task)" ion-button color="primary" clear style="float: left; margin: -5px -7px 0px 0px; padding: 0; width: 30px"><ion-icon name="ios-create-outline"></ion-icon></button>
          <ion-title>
            {{task.title}}
          </ion-title>
          <div class="time">
            <ion-icon name="time" class="icon"></ion-icon><span style="margin: 0px 0px 0 9px;">{{task.time}}</span>
          </div>
        </ion-card-header>
        <ion-card-content>
          <ion-item class="no-border" [hidden]="!task.desc">
            <p [innerHTML]="nl2br(task.desc)"></p>
          </ion-item>
          <ion-item class="no-border">
            <ion-badge item-right> {{tasks.daysOfWeek(task.days)}} </ion-badge>
          </ion-item>
        </ion-card-content>
      </ion-card>
      <ion-item-options side="right">
        <button ion-button (tap)="detail(dayIndex, taskIndex, task)" color="secondary">
               <ion-icon name="md-create" style="font-size: 18px;    margin: 7px 0 0 2px;"></ion-icon>
              </button>

        <button ion-button (tap)="delete(dayIndex, taskIndex, task)" color="secondary">
                <img style="width: 16px;" src="assets/images/fire-flame.svg" />
              </button>
      </ion-item-options>
    </ion-item-sliding>
  </ion-list>
</div>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""