-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified: Gemfile.lock -- removed angular-rails dependency (more trouble than its worth) new file: app/assets/javascripts/angular/controllers/home.js deleted: app/assets/javascripts/angular/controllers/homes.coffee new file: app/assets/javascripts/angular/controllers/project.js new file: app/assets/javascripts/angular/controllers/site.js deleted: app/assets/javascripts/angular/filters/.gitkeep deleted: app/assets/javascripts/angular/services/.gitkeep deleted: app/assets/javascripts/angular/widgets/.gitkeep new file: app/assets/javascripts/app.js modified: app/assets/javascripts/application.js new file: app/assets/javascripts/controllers.js.erb new file: app/assets/javascripts/filters.js renamed: app/assets/javascripts/angular/controllers/.gitkeep -> app/assets/javascripts/fitlers.js deleted: app/assets/javascripts/home.js.coffee new file: app/assets/javascripts/home_controller.js new file: app/assets/javascripts/services.js new file: app/assets/javascripts/widgets.js modified: app/assets/stylesheets/application.css new file: app/assets/templates/home.html new file: app/assets/templates/project.html new file: app/assets/templates/site.html deleted: app/assets/javascripts/fitlers.js deleted: app/assets/javascripts/home_controller.js -- setting up angular client side models, some of this crap will likely be deleted later modified: app/views/layouts/application.html.erb -- special mention, the rails <%= render.view %> or whatever it was has been deleted, it is no longer needed modified: db/schema.rb modified: db/seeds.rb -- added some more seed data
- Loading branch information
Showing
21 changed files
with
381 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict' | ||
|
||
//angular.module('home', []).config(function ($routeProvider, $httpProvider) { | ||
// | ||
// $routeProvider. | ||
// when('/', {templateUrl: '/assets/home.html', controller: HomeCtrl}). | ||
// otherwise({redirectTo: '/'}); | ||
// | ||
// //$httpProvider.defaults.headers. | ||
// // common['X-CSRF-Token'] = $['meta[name=csrf-token]'].attr('content'); | ||
//}); | ||
|
||
function HomeCtrl($scope) { | ||
|
||
$scope.welcomeMessage = "Welcome to <bar>"; | ||
|
||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict' | ||
|
||
|
||
function ProjectCtrl($scope, $http) { | ||
|
||
$http.get('projects.json').success(function(data) { | ||
$scope.projectList = data; | ||
}); | ||
|
||
|
||
|
||
$scope.ProjectName = "boobs r us"; | ||
|
||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict' | ||
|
||
|
||
function SiteCtrl($scope) { | ||
|
||
$scope.name = "farts r us"; | ||
|
||
|
||
} |
Empty file.
Empty file.
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use strict'; | ||
|
||
/* App Module */ | ||
|
||
angular.module('baw', []). | ||
config(['$routeProvider', function($routeProvider) { | ||
$routeProvider. | ||
when('/home', {templateUrl: 'assets/home.html', controller: HomeCtrl}). | ||
when('/projects', {templateUrl: 'assets/project.html', controller: ProjectCtrl}). | ||
when('/site', {templateUrl: 'assets/site.html', controller: SiteCtrl}). | ||
//when('/phones/:phoneId', {templateUrl: 'partials/phone-detail.html', controller: PhoneDetailCtrl}). | ||
otherwise({redirectTo: '/home'}); | ||
}]); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
///* App Controllers */ | ||
// | ||
//function PhotoGalleryCtrl($route, $http) { | ||
// $http.defaults.headers.post['Content-Type'] = 'application/json' | ||
// $http.defaults.headers.put['Content-Type'] = 'application/json' | ||
// | ||
// // assumes the presence of jQuery | ||
// var token = $("meta[name='csrf-token']").attr("content"); | ||
// $http.defaults.headers.post['X-CSRF-Token'] = token; | ||
// $http.defaults.headers.put['X-CSRF-Token'] = token; | ||
// $http.defaults.headers['delete']['X-CSRF-Token'] = token; | ||
// | ||
// | ||
// $route.when('/photographers', | ||
// {template: '<%= asset_path("photographers.html") %>', controller: PhotographersCtrl}); | ||
// | ||
// $route.when('/photographers/:photographer_id/galleries', | ||
// {template: '<%= asset_path("galleries.html") %>', controller: GalleriesCtrl}); | ||
// | ||
// $route.when('/photographers/:photographer_id/galleries/:gallery_id/photos', | ||
// {template: '<%= asset_path("photos.html") %>', controller: PhotosCtrl}); | ||
// | ||
// $route.otherwise({redirectTo: '/photographers'}); | ||
//} | ||
//PhotoGalleryCtrl.$inject = ['$route', '$http']; | ||
// | ||
//function PhotographersCtrl(Photographers) { | ||
// this.photographers = Photographers.index(); | ||
//} | ||
//PhotographersCtrl.$inject = ['Photographers']; | ||
// | ||
//function GalleriesCtrl(Galleries, Photographers, $routeParams) { | ||
// this.photographer = Photographers.get({ photographer_id: $routeParams.photographer_id }); | ||
// this.galleries = Galleries.index({ photographer_id: $routeParams.photographer_id }); | ||
//} | ||
//GalleriesCtrl.$inject = ['Galleries', 'Photographers', '$routeParams']; | ||
// | ||
//function PhotosCtrl(Photos, Galleries, Photographers, SelectedPhotos, $routeParams) { | ||
// var self = this; | ||
// | ||
// self.photographer = Photographers.get({ photographer_id: $routeParams.photographer_id }); | ||
// self.gallery = Galleries.get({ photographer_id: $routeParams.photographer_id, gallery_id: $routeParams.gallery_id }); | ||
// self.photos = Photos.index({ photographer_id: $routeParams.photographer_id, gallery_id: $routeParams.gallery_id }); | ||
// self.selected_photos = SelectedPhotos.index(); | ||
// | ||
// | ||
// self.selectPhoto = function(photo) { | ||
// var selected_photo = new SelectedPhotos({ selected_photo: { photo_id: photo.id } }); | ||
// selected_photo.$create(function() { | ||
// self.selected_photos.push(selected_photo); | ||
// }); | ||
// } | ||
// | ||
// self.deleteSelectedPhoto = function(selected_photo) { | ||
// angular.Array.remove(self.selected_photos, selected_photo); | ||
// selected_photo.$destroy({ selected_photo_id: selected_photo.id }); | ||
// } | ||
// | ||
// self.saveSelectedPhoto = function(selected_photo) { | ||
// selected_photo.$update({ selected_photo_id: selected_photo.id }); | ||
// $('input').blur(); | ||
// } | ||
// | ||
//} | ||
//PhotosCtrl.$inject = ['Photos', 'Galleries', 'Photographers', 'SelectedPhotos', '$routeParams']; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* http://docs.angularjs.org/#!angular.filter */ |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
function HomeCtrl($scope) { | ||
|
||
$scope.welcomeMessage = "Welcome to <bar>"; | ||
|
||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* http://docs.angularjs.org/#!angular.service */ | ||
|
||
//angular.service('Photographers', function($resource) { | ||
// return $resource('photographers/:photographer_id', {}, | ||
// { 'index': { method: 'GET', isArray: true }}); | ||
//}); | ||
// | ||
//angular.service('Galleries', function($resource) { | ||
// return $resource('photographers/:photographer_id/galleries/:gallery_id', {}, | ||
// { 'index': { method: 'GET', isArray: true }}); | ||
//}); | ||
// | ||
//angular.service('Photos', function($resource) { | ||
// return $resource('photographers/:photographer_id/galleries/:gallery_id/photos', {}, | ||
// { 'index': { method: 'GET', isArray: true }}); | ||
//}); | ||
// | ||
//angular.service('SelectedPhotos', function($resource) { | ||
// return $resource('selected_photos/:selected_photo_id', {}, | ||
// { 'create': { method: 'POST' }, | ||
// 'index': { method: 'GET', isArray: true }, | ||
// 'update': { method: 'PUT' }, | ||
// 'destroy': { method: 'DELETE' }}); | ||
//}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* http://docs.angularjs.org/#!angular.widget */ | ||
|
||
//angular.directive('my:cycle', function(expr,el){ | ||
// return function(container){ | ||
// this.$watch(function() { | ||
// if ($(container).children().length) { | ||
// $(container).cycle({ fx: 'fade', | ||
// speed: 500, | ||
// timeout: 3000, | ||
// pause: 1, | ||
// next: '#next', | ||
// prev: '#prev' }); | ||
// } | ||
// }); | ||
// } | ||
//}); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<h1>This is a test</h1> | ||
|
||
<p>{{welcomeMessage}}</p> | ||
|
||
<a href="#/projects/" >fun times</a> | ||
<a href="#/site/" >funny times</a> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<h1>This is a project listing</h1> | ||
|
||
<p>{{ProjectName}}</p> | ||
|
||
<ul> | ||
<li ng-repeat="project in projectList"> | ||
<div> | ||
<h3>{{project.name}}</h3> | ||
<p ng-bind="project.description" ></p> | ||
<a ng-href="{{project.urn}}">{{project.urn}}</a> | ||
|
||
<pre>{{project.notes}}</pre> | ||
|
||
<small>{{updated_at}}</small> | ||
|
||
</div> | ||
</li> | ||
|
||
</ul> | ||
<a href="#/" >less fun times</a> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h1>This is a site listing</h1> | ||
|
||
<p>{{name}}</p> | ||
|
||
<a href="#/" >less fun times</a> |
Oops, something went wrong.