copelandia's People
Forkers
dgoutam brockboland bangpound extremal web5design e0ipso gabidrg drupalicus revagomes alnutile miranda820 alianov heypaxton bacanapps nayaorg arpitr jasondsouza vrwiredcopelandia's Issues
RestWS and file paths
The file path that RestWS serves up for a node object is
field_recipe_photos: [
0: {
alt: "",
file: {
uri:"http://copelandia.lulladev.com/file/2",
id:"2",
resource:"file"
}
}
]
Obviously that is not the correct uri for the file. Need to figure out how to get the entire uri. Is this a bug in restws?
Getting not allowed by Access-Control-Allow-Origin error
When I try to load the http://localhost:9000/#/recipe/1 page from the client server I get the following error:
XMLHttpRequest cannot load http://copelandia.localhost:8082/node/1. Origin http://localhost:9000 is not allowed by Access-Control-Allow-Origin. localhost:1
Error: Error while interpolating: {{getImage(recipe)}}
TypeError: Cannot read property 'length' of undefined
at Error ()
at Object.k (https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js:54:410)
at Object.e.$digest (https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js:89:233)
at Object.e.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js:91:431)
at f (https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js:100:38)
at B (https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js:103:323)
at XMLHttpRequest.p.onreadystatechange (https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js:104:455)
I've tried uncommenting this to the .htaccess file, but not luck.
Header set Access-Control-Allow-Origin "*"
Any ideas on how to get around this?
Thanks,
Greg
Implement Dynamic Routing
Page Routing Issue
After the dynamic routing.
#22
the routing of individual nodes/pages appears to be broken.
Look into restangular
Just saw this today. Want to look into it further at some point.
https://github.com/mgonto/restangular
Testing out a repeat directive for protobots
Cookbook Filter
Mimic effect of the shake shack location&menu slider menu.
Recipe View
Created the routes and updated some resources to pass paramaters to the route, via the url, updated some of the controllers so we have the ability to see individual recipes.
Server/Client
I'd like to consider AngularJS for this. The Drupal project has a lot of similar goals I think: http://drupal.org/project/angularjs
User registration and authentication
Provide a way for users to register and then authenticate in the application.
Users will be created in the Drupal database and this db will be queried through a Web Service on authentication.
Let authenticated users submit recipes
Once a user has registered, he should have an area where he can manage his recipes and submit new ones.
iOS client tweaks
Once #33 is merged.
- Change recipe view to a UIViewTable
- List ingredients in a separate UITableView
- Display blocking window or use background process while loading data from remote server
- Convert the HTML for description and instruction fields to formatted text
- Resize the description and instruction fiels as necessary
- Remove Ingredients from the Recipe if they no longer appear in Drupal
- Finish fixing bug where new ingredients are not added to the display
Sharing data-binding between two includes, not an easy task...
Moving client/angularjs to leverage ZURB not TWITTER
It's so much better... any objections to making this change?
I plan to use a slightly different directory structure, but the info http://pburke.de/yeoman-foundation-sass-luv/ is very valid.
Routing
Has anyone looked at http://drupal.org/project/restws? The AngularJS project requires it and most of that project are to do what I think we're trying to accomplish here.
Building a Drupal Resource for Angular
A resource in Angular is basically a data source and constructors to query that source.
The AngularJS module already has a decent start on a resource library which uses the endpoints provided by RestWS module for Drupal.
angular.module('node', ['ngResource']).factory('Node', function($resource) {
var Node = $resource('/node/:nid', {}, {
update: { method: 'PUT' }
});
Node.prototype.update = function(node) {
return Node.update({nid: this.nid}, angular.extend({}, this, {nid: undefined}), node);
}
return Node;
}).config(["$httpProvider", function(provider) {
provider.defaults.headers.common['X-CSRF-Token'] = Drupal.settings.restws_csrf_token;
}]);
angular.module('nodes', ['ngResource']).factory('Nodes', function($resource) {
var Node = $resource('/node.json', {}, {
});
return Node;
});
This essentially creates a factory for retrieving node data which is then passed to a controller like so:
angular.module('nodelist', ['node', 'nodes']).
config(function($routeProvider) {
$routeProvider.
when('/', {controller:ListCtrl, templateUrl:'/angular/nodes/list'}).
//when('/edit/:nid', {controller:EditCtrl, templateUrl:'detail.html'}).
//when('/new', {controller:CreateCtrl, templateUrl:'detail.html'}).
otherwise({redirectTo:'/'});
});
function ListCtrl($scope, Nodes, Node) {
$scope.nodetype = '';
$scope.nodes = Nodes.get({limit: 25});
$scope.promote = function(node, newValue) {
var update = new Node();
update.promote = newValue;
update.nid = node.nid;
update.update();
node.promote = newValue;
}
$scope.$watch('nodetype', function(newValue, oldValue) {
if ('' != newValue) {
$scope.nodes = Nodes.get({limit: 25, type: newValue});
}
});
}
While this is a good start in being able to display and manipulate nodes within Drupal, we're going to need to create other resource handlers for things like Views and other modules.
If we're going to use RestWS on the server (Drupal) side, it looks like we will currently have support for entities so, users and nodes.
So the task here is to start with what is supported in RestWS and produce resource handlers in Angular for:
- Nodes: do we have enough with the code outline above?
- Users: implement a user factory in Angular
Configure Solr
So things such as searching can be done easily and fast by clients.
AngularJS client depend on deprecated restws
The AngularJS depends on the deprecated RestWS server.
I think the resource.js needs to be eddited to point to the new resources (var Node = $resource('http://copelandia.lulladev.com/api/node/:id').
And the hard part, OAuth authentication needs to be implemented in the AngularJS client.
Sorry, I don have the knowledge to implement this change.
Is this project still maintained? I would like to build a Drupal/REST -> AngularJS application, an be future proof as D8 has REST in core.
Copelandia Needs more Emoji
๐๐๐๐
Scss files: New Location
One of the issues we talk about is the 'presentation' folder, when grunt creates a 'build', it would be nice to do one of two things.
- build so the scss file is not included in the 'dist' folder. so that if you are using the files in that folder for perhaps a phonegap app, you would be able to have only the files you need in that folder... which scss files are not in that category.
- move the scss files out of the app directory manually, and still compile the css in the app folder.
Images: create a proces for a default image if no image is available
Noticing that when there is no image, it breaks the design, would be interesting to create a default for when no image is available.
Create a REST resource for menus
Here's a list of resources provided by RestWS
We should probably have one for menu.
Take a look at restws.api.php and write a submodule to serve up information from the Drupal menu system.
This would be good to contribute back to the RestWS project.
Services vs RestWS
For the ms... project, I saw that you installed Services and discarded RestWS. I'd like to hear more about why, and if it would be a better solution for us here. What is involved?
RestWS has some shortcomings (namely that I can't understand it because it's so abstracted) as it only serves up entities, and it gives uri's to get info on a file rather than just serve the file info with the original payload for a node. And that is just so far. We're going to want to be able to serve even more from Drupal and need to work with a module we can understand.
Can you give us a better idea of why you chose Services and if it would help us with some of these things a bit better?
Concepts for Display or Transition to a recipe.
Errors using bower install
~/Sites/lullabot/arts/copelandia/clients/angularjs (master): sudo npm install && bower install
bower cloning git://github.com/angular/bower-angular-resource.git
bower cloning git://github.com/kriskowal/es5-shim
bower cached git://github.com/angular/bower-angular-resource.git
bower fetching angular-resource
bower cached git://github.com/kriskowal/es5-shim
bower fetching es5-shim
bower cloning git://github.com/angular/bower-angular.git
bower cloning git://github.com/angular/bower-angular-cookies.git
bower cached git://github.com/angular/bower-angular.git
bower fetching angular
bower cached git://github.com/angular/bower-angular-cookies.git
bower fetching angular-cookies
bower cloning git://github.com/bestiejs/json3.git
bower error status code of git: 255
There were errors, here's a summary of them:
- angular status code of git: 255
Filter HTML : move to own partial and include in main
Initial Setup
The install readme is incomplete
It states that you install drupal and enable the 3 modules and you should get the same results as http://copelandia.lulladev.com/
but you need to do more than this..
You need to set the theme to Shiny 7.x-1.0, and turn off the toolbar module (so you don't duplicate admin menus)
What else do you need to do to get the stated results?
errors, stuck after last pull
tried to run grunt server
... Uhoh. Got error listen EADDRINUSE ... Error: listen EADDRINUSE at errnoException (net.js:878:11) at Server._listen2 (net.js:1016:14) at listen (net.js:1038:10) at Server.listen (net.js:1104:5) at Server.listen (/Users/webthingee/Sites/lullabot/arts/copelandia/clients/angularjs/node_modules/grunt-contrib-livereload/node_modules/tiny-lr/lib/server.js:133:15) at Object.startLRServer (/Users/webthingee/Sites/lullabot/arts/copelandia/clients/angularjs/node_modules/grunt-contrib-livereload/lib/utils.js:21:11) at Object.<anonymous> (/Users/webthingee/Sites/lullabot/arts/copelandia/clients/angularjs/node_modules/grunt-contrib-livereload/tasks/livereload.js:44:20) at Object.thisTask.fn (/Users/webthingee/Sites/lullabot/arts/copelandia/clients/angularjs/node_modules/grunt/lib/grunt/task.js:78:16) at Object.<anonymous> (/Users/webthingee/Sites/lullabot/arts/copelandia/clients/angularjs/node_modules/grunt/lib/util/task.js:282:30) at Task.runTaskFn (/Users/webthingee/Sites/lullabot/arts/copelandia/clients/angularjs/node_modules/grunt/lib/util/task.js:235:24)
Origin not allowed
I've committed a preliminary version of the Angular client in an attempt to just list the current nodes. Not quite working yet as I need to get an answer here: http://drupal.org/node/1937756
Set up Services + OAuth to authenticate client sites
Services offers a pretty neat way to authenticate clients using OAuth in order to perform authenticated requests. These requests can be, for example, registering a user or submitting a new recipe.
By following this tutorial I have set up locally a REST server to manage users.
susy not found
I've followed the directions and installed susy and sass-globbing but am still getting an error.
install messages:
$ sudo gem install susy
Password:
Successfully installed susy-1.0.8
1 gem installed
Installing ri documentation for susy-1.0.8...
Installing RDoc documentation for susy-1.0.8...
$ sudo gem install sass-globbing
Password:
Successfully installed sass-globbing-1.0.0
1 gem installed
Installing ri documentation for sass-globbing-1.0.0...
Installing RDoc documentation for sass-globbing-1.0.0...
error message
What should I do?
Question about RestWS
I noticed upon install that to get the local client (Angular.js) to work I still had to enable the RestWS module.
I assume since Services is there that maybe this project is using that now and not RestWS?
Thanks
Scaffolding out the Recipe Display
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.