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
| { | |
| "completed":false, | |
| "annotations":[ | |
| { | |
| "task":"transcription", | |
| "value":{ | |
| "0":{ | |
| "x":145.859375, | |
| "y":281, | |
| "letter":"Α", |
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
| { | |
| "completed":false, | |
| "annotations":[ | |
| { | |
| "task":"transcription", | |
| "value":{ | |
| "0":{ | |
| "x":145.859375, | |
| "y":281, | |
| "letter":"Α", |
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
| var Classification = Backbone.Model.extend({ | |
| url:"https://panoptes-staging.zooniverse.org/api/classifications", | |
| // Specify default values for the model. | |
| defaults: function(){ | |
| return { | |
| 'completed': false, | |
| 'annotations': [{ | |
| 'task': 'transcription', | |
| '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
| window.apiClient.api.type('projects').get(window.project_id).then( | |
| function(project) { | |
| console.log(project); /* retrieve all the pages for the project */ | |
| project[0].get('pages').then( | |
| function(pages) { | |
| /* iterate through each page | |
| * and add content to the model */ | |
| for(var key in pages){ | |
| /* check for presence of 'url_key' */ | |
| if('url_key' in pages[key]) { |
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
| Project = Backbone.Model.extend({ | |
| urlRoot: "https://panoptes-staging.zooniverse.org/api/subject_sets?project_id="+window.project_id, | |
| // Specify default values for the model. | |
| defaults: function(){ | |
| return { | |
| slug: 'default_slug', | |
| display_name: '', | |
| introduction: '', | |
| description: '', |
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
| sendAuthentication = function (xhr) { | |
| xhr.setRequestHeader('Accept', "application/vnd.api+json; version=1"); | |
| }; | |
| SubjectModel = Backbone.Model.extend({ | |
| initialize:function(opts) { | |
| console.log("init subject : "+opts.id); | |
| } | |
| }); | |
| Subjects = Backbone.Collection.extend({ |