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.on('taskAdd', function(event, story) { | |
| jQuery.get('/Task/add', {projectId: story.projectId(), storyId: story.id()}, function(content) { | |
| var title = "Add new task to story '" + ko.toJS(story.title()) + "'"; | |
| var buttons = [ | |
| { | |
| label: "Save", | |
| class: "btn-primary pull-right", | |
| callback: function () { | |
| var form = jQuery('#formTaskNew'); | |
| var formItems = form.serializeJSON(); |
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 parts = ["<div class='bootbox modal' tabindex='-1' style='overflow:hidden;'>"]; | |
| parts.push("<div class='modal-dialog'>"); | |
| parts.push("<div class='modal-content'>"); | |
| if (options['header']) { | |
| var closeButton = ''; | |
| if (typeof options['headerCloseButton'] == 'undefined' || options['headerCloseButton']) { | |
| closeButton = "<a href='"+_defaultHref+"' class='close'>×</a>"; | |
| } |
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
| // Open bootbox modal | |
| var modal = openBootboxDialog(title, content, buttons, false); | |
| modal.on('hidden.bs.modal', function() { | |
| console.log('hidden'); | |
| }); | |
| modal.on('show.bs.modal', function() { | |
| console.log('show'); | |
| }); |
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
| /** | |
| * Local environment settings | |
| * | |
| * While you're developing your app, this config file should include | |
| * any settings specifically for your development computer (db passwords, etc.) | |
| * When you're ready to deploy your app in production, you can use this file | |
| * for configuration options on the server where it will be deployed. | |
| * | |
| * | |
| * PLEASE NOTE: |
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
| module.exports = { | |
| index: function (req,res) { | |
| File.find().exec(function(err, files) { | |
| res.view({ | |
| files: files, | |
| user: req.user | |
| }); | |
| }); | |
| }, |
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
| Object {status: 500, errors: Array[1]} | |
| errors: Array[1] | |
| 0: Object | |
| ValidationError: Object | |
| title: Array[1] | |
| 0: Object | |
| args: Array[1] | |
| data: "6" | |
| message: "Validation error: "6" Rule "minLength(5)" failed." | |
| rule: "minLength" |
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 travelBookingApplication = angular.module("travelBookingApplication", [ | |
| "ngRoute", | |
| "angularSails.io", | |
| "travelBookingControllers", | |
| "travelBookingServices" | |
| ]); | |
| travelBookingApplication.factory("sailsSocket", function(sailsSocketFactory) { | |
| return sailsSocketFactory(); | |
| }); |
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
| wunder@wunder-VirtualBox:~/projects$ node Taskboard/app.js | |
| warn: Session secret must be identified! | |
| Should be of the form: `config.session = { secret: "someVerySecureString" }` | |
| Automatically generating one for now... | |
| (Note: This will change each time the server starts and break multi-instance deployments.) | |
| e.g. To set up a session secret, add or update it in `config/session.js`: | |
| module.exports.session = { secret: "keyboardcat" } | |
| info: | |
| info: | |
| info: Sails.js <| |
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
| // Sort stories by tasks progress | |
| data.stories.data.sort(dynamicSortMultiple("!tasks.progress", "title", "priority")); | |
| function dynamicSort(property) { | |
| return function(obj1, obj2) { | |
| var reverse = (property.indexOf("!") === 0); | |
| if (reverse) { | |
| property.substr(1); | |
| } |
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
| // Sort stories by tasks progress, story title and priority | |
| data.stories.data.sort(dynamicSortMultiple("!tasks.progress", "title", "priority")); | |
| function dynamicSort(property) { | |
| return function(obj1, obj2) { | |
| var reverse = (property.indexOf("!") === 0); | |
| var comparisonValue1, comparisonValue2 = ''; | |
| if (reverse) { | |
| property = property.substr(1); |
OlderNewer