Browse Source

events list templeted, now, only in the file templateEvents.html

master
arnaucode 7 years ago
parent
commit
da8c91830e
10 changed files with 53 additions and 114 deletions
  1. +1
    -1
      bower.json
  2. +0
    -4
      www/index.html
  3. +4
    -2
      www/js/calendar.js
  4. +1
    -27
      www/templates/alerts.html
  5. +1
    -37
      www/templates/byCategory.html
  6. +1
    -37
      www/templates/byPlace.html
  7. +1
    -2
      www/templates/calendar.html
  8. +3
    -2
      www/templates/events.html
  9. +4
    -2
      www/templates/savedEvents.html
  10. +37
    -0
      www/templates/templateEvents.html

+ 1
- 1
bower.json

@ -8,6 +8,6 @@
"angular-translate": "^2.14.0",
"ui-leaflet": "^2.0.0",
"ngCordova": "^0.1.27-alpha",
"ionic-calendar": "^0.3.7"
"material-calendar": "^0.2.14"
}
}

+ 0
- 4
www/index.html

@ -42,10 +42,6 @@
<script src="lib/angular-translate/angular-translate.js"></script>
<script src="js/translations.js"></script>
<!-- ionic-calendar -->
<link rel="stylesheet" href="lib/ionic-calendar/dist/css/calendar.min.css"/>
<script src="lib/ionic-calendar/dist/js/calendar-tpls.min.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/menu.js"></script>

+ 4
- 2
www/js/calendar.js

@ -1,5 +1,7 @@
angular.module('app.calendar', ['pascalprecht.translate', 'ui.rCalendar'])
angular.module('app.calendar', ['pascalprecht.translate'])
.controller('CalendarCtrl', function($scope, $http, $ionicModal, $timeout,
$ionicLoading, $filter) {
.controller('CalendarCtrl', function($scope, $http, $ionicModal, $timeout, $ionicLoading, $filter) {
});

+ 1
- 27
www/templates/alerts.html

@ -2,33 +2,7 @@
<ion-content class="c_red200">
<ion-refresher pulling-text="{{'Pull_to_refresh' | translate}}..." on-refresh="doRefresh()">
</ion-refresher>
<div class="card" ng-repeat="event in events">
<a class="item item-avatar" ng-href="#/app/users/{{event.user._id}}">
<img ng-src="{{event.user.img}}">
<h2>{{event.user.username}}</h2>
<p>{{event.user.shortDescription}}</p>
</a>
<a ng-href="#/app/events/{{event._id}}" class="item item-text-wrap">
<h2>{{event.title}}</h2>
<p>{{event.description}}</p>
<p>{{event.date | date: 'HH:mm, dd/MM/yyyy'}}</p>
</a>
<div class="item tabs tabs-icon-only">
<a class="tab-item" ng-click="share(event)">
<i class="icon ion-android-share-alt"></i>
</a>
<a class="tab-item">
</a>
<a class="tab-item" ng-click="unsaveEvent(event)"
ng-show="isEventSaved(event)">
<i class="icon ion-heart ctext_red600"></i>
</a>
<a class="tab-item" ng-click="saveEvent(event)"
ng-hide="isEventSaved(event)">
<i class="icon ion-heart"></i>
</a>
</div>
</div>
<div ng-include="'templates/templateEvents.html'"></div>
</ion-content>
</ion-view>

+ 1
- 37
www/templates/byCategory.html

@ -2,42 +2,6 @@
<ion-content class="c_blueGrey100">
<ion-refresher pulling-text="{{'Pull_to_refresh' | translate}}..." on-refresh="doRefresh()">
</ion-refresher>
<div class="card" ng-repeat="event in events">
<a class="item item-avatar" ng-href="#/app/users/{{event.user._id}}">
<img ng-src="{{event.user.img}}">
<h2>{{event.user.username}}</h2>
<p>{{event.user.shortDescription}}</p>
</a>
<a ng-href="#/app/events/{{event._id}}" class="item item-image"
ng-show="event.img">
<img ng-src="{{event.img}}">
</a>
<a ng-href="#/app/events/{{event._id}}" class="item item-text-wrap">
<div class="item-note">{{event.date | date: 'HH:mm, dd/MM/yyyy'}}</div>
<h2>{{event.title}}</h2>
<p>{{event.description}}</p>
<p>
<span class="o_badge c_blueGrey300" ng-repeat="category in event.categories">
{{category.name}}
</span>
</p>
</a>
<div class="item tabs tabs-icon-only">
<a class="tab-item" ng-click="share(event)">
<i class="icon ion-android-share-alt"></i>
</a>
<a class="tab-item">
</a>
<a class="tab-item" ng-click="unsaveEvent(event)"
ng-show="isEventSaved(event)">
<i class="icon ion-heart ctext_red600"></i>
</a>
<a class="tab-item" ng-click="saveEvent(event)"
ng-hide="isEventSaved(event)">
<i class="icon ion-heart"></i>
</a>
</div>
</div>
<div ng-include="'templates/templateEvents.html'"></div>
</ion-content>
</ion-view>

+ 1
- 37
www/templates/byPlace.html

@ -2,42 +2,6 @@
<ion-content class="c_blueGrey100">
<ion-refresher pulling-text="{{'Pull_to_refresh' | translate}}..." on-refresh="doRefresh()">
</ion-refresher>
<div class="card" ng-repeat="event in events">
<a class="item item-avatar" ng-href="#/app/users/{{event.user._id}}">
<img ng-src="{{event.user.img}}">
<h2>{{event.user.username}}</h2>
<p>{{event.user.shortDescription}}</p>
</a>
<a ng-href="#/app/events/{{event._id}}" class="item item-image"
ng-show="event.img">
<img ng-src="{{event.img}}">
</a>
<a ng-href="#/app/events/{{event._id}}" class="item item-text-wrap">
<div class="item-note">{{event.date | date: 'HH:mm, dd/MM/yyyy'}}</div>
<h2>{{event.title}}</h2>
<p>{{event.description}}</p>
<p>
<span class="o_badge c_blueGrey300" ng-repeat="category in event.categories">
{{category.name}}
</span>
</p>
</a>
<div class="item tabs tabs-icon-only">
<a class="tab-item" ng-click="share(event)">
<i class="icon ion-android-share-alt"></i>
</a>
<a class="tab-item">
</a>
<a class="tab-item" ng-click="unsaveEvent(event)"
ng-show="isEventSaved(event)">
<i class="icon ion-heart ctext_red600"></i>
</a>
<a class="tab-item" ng-click="saveEvent(event)"
ng-hide="isEventSaved(event)">
<i class="icon ion-heart"></i>
</a>
</div>
</div>
<div ng-include="'templates/templateEvents.html'"></div>
</ion-content>
</ion-view>

+ 1
- 2
www/templates/calendar.html

@ -1,6 +1,5 @@
<ion-view view-title="Calendar">
<ion-content>
<calendar calendar-mode="mode"
event-source="eventSource">
</ion-content>
</ion-view>

+ 3
- 2
www/templates/events.html

@ -6,7 +6,7 @@
ng-show="alerts">
<i class="icon ion-android-alert"></i> <b>{{alerts.length}}</b> Emergency alerts!
</a>
<div class="card" ng-repeat="event in events">
<!--<div class="card" ng-repeat="event in events">
<a class="item item-avatar" ng-href="#/app/users/{{event.user._id}}">
<img ng-src="{{event.user.img}}">
<h2>{{event.user.username}}</h2>
@ -42,6 +42,7 @@
<i class="icon ion-heart"></i>
</a>
</div>
</div>
</div>-->
<div ng-include="'templates/templateEvents.html'"></div>
</ion-content>
</ion-view>

+ 4
- 2
www/templates/savedEvents.html

@ -1,6 +1,6 @@
<ion-view view-title="Saved Events">
<ion-content class="c_blueGrey100">
<div class="card" ng-repeat="event in events">
<!--<div class="card" ng-repeat="event in events">
<a class="item item-avatar" ng-href="#/app/users/{{event.user._id}}">
<img ng-src="{{event.user.img}}">
<h2>{{event.user.username}}</h2>
@ -30,6 +30,8 @@
<i class="icon ion-heart"></i>
</a>
</div>
</div>
</div>-->
<div ng-include="'templates/templateEvents.html'"></div>
</ion-content>
</ion-view>

+ 37
- 0
www/templates/templateEvents.html

@ -0,0 +1,37 @@
<div class="card" ng-repeat="event in events">
<a class="item item-avatar" ng-href="#/app/users/{{event.user._id}}">
<img ng-src="{{event.user.img}}">
<h2>{{event.user.username}}</h2>
<p>{{event.user.shortDescription}}</p>
</a>
<a ng-href="#/app/events/{{event._id}}" class="item item-image"
ng-show="event.img">
<img ng-src="{{event.img}}">
</a>
<a ng-href="#/app/events/{{event._id}}" class="item item-text-wrap">
<div class="item-note">{{event.date | date: 'HH:mm, dd/MM/yyyy'}}</div>
<h2>{{event.title}}</h2>
<p>{{event.description}}</p>
<p>
<span class="o_badge c_blueGrey300" ng-repeat="category in event.categories">
{{category.name}}
</span>
</p>
</a>
<div class="item tabs tabs-icon-only">
<a class="tab-item" ng-click="share(event)">
<i class="icon ion-android-share-alt"></i>
</a>
<a class="tab-item">
</a>
<a class="tab-item" ng-click="unsaveEvent(event)"
ng-show="isEventSaved(event)">
<i class="icon ion-heart ctext_red600"></i>
</a>
<a class="tab-item" ng-click="saveEvent(event)"
ng-hide="isEventSaved(event)">
<i class="icon ion-heart"></i>
</a>
</div>
</div>

Loading…
Cancel
Save