summaryrefslogtreecommitdiff
path: root/www/js/NewsCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-12-28 07:47:05 -0500
committerPliable Pixels <pliablepixels@gmail.com>2018-12-28 07:47:05 -0500
commitc07d973c02d9fba7f7ee744a96f4a684426243b0 (patch)
treee16ac6f15a742def2109df7762f8f7bdeb2603f5 /www/js/NewsCtrl.js
parentd7c871c203618ead83871cb321373241fae33c97 (diff)
rename DataModel to NVR - more logical
Diffstat (limited to 'www/js/NewsCtrl.js')
-rw-r--r--www/js/NewsCtrl.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/www/js/NewsCtrl.js b/www/js/NewsCtrl.js
index cf696db6..1e84e535 100644
--- a/www/js/NewsCtrl.js
+++ b/www/js/NewsCtrl.js
@@ -2,7 +2,7 @@
/* jslint browser: true*/
/* global cordova,StatusBar,angular,console,moment*/
-angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$rootScope', '$ionicModal', 'NVRDataModel', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$http', 'zm', function ($scope, $rootScope, $ionicModal, NVRDataModel, $ionicSideMenuDelegate, $ionicHistory, $state, $http, zm) {
+angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$rootScope', '$ionicModal', 'NVR', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$http', 'zm', function ($scope, $rootScope, $ionicModal, NVR, $ionicSideMenuDelegate, $ionicHistory, $state, $http, zm) {
$scope.openMenu = function () {
$ionicSideMenuDelegate.toggleLeft();
};
@@ -41,9 +41,9 @@ angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$ro
$scope.$on ('$ionicView.beforeEnter', function () {
$scope.$on ( "process-push", function () {
- NVRDataModel.debug (">> NewsCtrl: push handler");
- var s = NVRDataModel.evaluateTappedNotification();
- NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s));
+ NVR.debug (">> NewsCtrl: push handler");
+ var s = NVR.evaluateTappedNotification();
+ NVR.debug("tapped Notification evaluation:"+ JSON.stringify(s));
$ionicHistory.nextViewOptions({
disableAnimate:true,
disableBack: true
@@ -54,12 +54,12 @@ angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$ro
$scope.$on('$ionicView.enter', function () {
// console.log("**VIEW ** News Ctrl Entered");
- NVRDataModel.setAwake(false);
+ NVR.setAwake(false);
});
$scope.isUnread = function (itemdate) {
- var lastDate = NVRDataModel.getLatestBlogPostChecked();
+ var lastDate = NVR.getLatestBlogPostChecked();
//console.log ("BLOG DATE="+itemdate+" LAST DATE="+lastDate);
//get("latestBlogPostChecked");
if (!lastDate) return true;
@@ -73,22 +73,22 @@ angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$ro
$scope.loadPost = function (item, itemdate) {
var lastDate =
- NVRDataModel.getLatestBlogPostChecked(); //zmStorageService.get("latestBlogPostChecked");
+ NVR.getLatestBlogPostChecked(); //zmStorageService.get("latestBlogPostChecked");
if (!lastDate) {
- NVRDataModel.debug("First time checking blog posts, I see");
- NVRDataModel.setLatestBlogPostChecked(itemdate);
+ NVR.debug("First time checking blog posts, I see");
+ NVR.setLatestBlogPostChecked(itemdate);
//zmStorageService.set("latestBlogPostChecked", itemdate);
} else {
- NVRDataModel.debug("last post checked is " + lastDate);
- NVRDataModel.debug("current post dated is " + itemdate);
+ NVR.debug("last post checked is " + lastDate);
+ NVR.debug("current post dated is " + itemdate);
var mLastDate = moment(lastDate);
var mItemDate = moment(itemdate);
if (mItemDate.diff(mLastDate, 'seconds') > 0) {
- NVRDataModel.debug("Updating lastDate to this post");
+ NVR.debug("Updating lastDate to this post");
- NVRDataModel.setLatestBlogPostChecked(itemdate); //zmStorageService.set("latestBlogPostChecked", itemdate);
+ NVR.setLatestBlogPostChecked(itemdate); //zmStorageService.set("latestBlogPostChecked", itemdate);
if (itemdate == $scope.newsItems[0].date) {
// we are reading the latest post