This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.i = 0; | |
$scope.likeClick = function(data){ | |
$scope.data[$scope.i].likes.byUser = $dataservice.likeClick(data); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ionic Starter App | |
// angular.module is a global place for creating, registering and retrieving Angular modules | |
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) | |
// the 2nd parameter is an array of 'requires' | |
// 'starter.controllers' is found in controllers.js | |
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'ngCordova']) | |
.run(function($ionicPlatform, $rootScope, $cordovaNetwork, $state, $authservice) { | |
$ionicPlatform.ready(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('starter.services', []) | |
.factory('$localstorage', ['$window', function($window) { | |
return { | |
set: function(key, value) { | |
$window.localStorage[key] = value; | |
}, | |
get: function(key, defaultValue) { | |
return $window.localStorage[key] || defaultValue; | |
}, | |
setObject: function(key, value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.factory('$authservice', ['$window', '$localstorage', '$state', function($window, $localstorage, $state) { | |
// Access local storage for existing user info | |
var SHIFT = $localstorage.getObject("Shift") | |
// Does session exist? | |
if (SHIFT && SHIFT.session.token) { | |
console.log("$authservice: Existing Session found: ", [SHIFT]) | |
} else { | |
console.log("$authservice: No session found.") | |
SHIFT = { | |
session: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( '_JEXEC', 1 ); | |
define('JPATH_BASE', '../../../'); | |
require_once ( JPATH_BASE .'/includes/defines.php' ); | |
require_once ( JPATH_BASE .'/includes/framework.php' ); | |
$database = &JFactory::getDBO(); | |
$sql = "SELECT * FROM `b7j6z_content` WHERE `state` = '1'"; // Select data from DB | |
$database->setQuery( $sql ); | |
$result=$database->loadAssocList(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="results"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(function(){ //// Timeout required to grab iFrame info after Disqus load | |
var newURL = jQuery(".moduletable-lang a").attr("href"); | |
var curURL = decodeURIComponent(jQuery("iframe").attr("src")); | |
var newTitle = "1211-new-brunswick-lagging-behind-other-parts-of-canada-on-wilderness-protection-cpaws-report"; | |
if (jQuery("body").hasClass("fr-fr")){ | |
createNewURL(newURL,newTitle,curURL); /// custome function to build new uri | |
} | |
},750); | |
function createNewURL(newURL,newTitle,curURL){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.user-box{ | |
margin:5px; | |
display:inline-block; | |
} | |
.user-image{ | |
max-width:100px; | |
max-height:100px; | |
border-radius:100px; | |
overflow:hidden; | |
margin:5px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
background:#fff; | |
} | |
#map{ | |
height: 300px; | |
} | |
#legend{ | |
width:100%; | |
padding:5px; | |
text-align:left; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#map_canvas { | |
width: 400px; | |
height: 400px; | |
margin: 0 auto; | |
} | |
.info { | |
display:none; | |
} |