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 | |
| return array( | |
| 'encryption_key' => 'Z87H4w0Ak5mbmx56ScnUW2xeJkY2qvEG', | |
| 'mysql_user' => 'homestead', | |
| 'mysql_password' => 'secret', | |
| 'mysql_host' => 'localhost' | |
| ); |
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 searchTerm = 'cats'; | |
| $.ajax( | |
| "https://www.reddit.com/subreddits/search.json", | |
| { | |
| data: { q: searchTerm }, | |
| success: function(responseData) { | |
| if (responseData.data.children.length > 0) { | |
| console.log('# of results: ' + responseData.data.children.length); | |
| $.each(responseData.data.children, function(idx, searchResult) { |
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 EditView = Sagamore.Views.ModelForm.extend({ | |
| fields: [ | |
| {name: "login", label: "Username"}, | |
| {name: "password", label: "Password"} | |
| ] | |
| }).extend(Sagamore.Lib.ModalForm) |
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
| class Sagamore.Views.ModuleMenu extends Sagamore.View | |
| initialize: (menu) -> | |
| @menu = menu | |
| render: -> |
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
| class TableView extends Sagamore.Views.CollectionTable | |
| className: "settings" | |
| fields: [ | |
| {id: 'actions', title: '', render: (options) -> | |
| $('<a href="#" class="delete">Delete</a>').click -> | |
| if confirm("Are you sure you want to delete user '" + options.model.get("login") + "'?") | |
| options.model.destroy | |
| } | |
| {id: 'id', title: 'Name', sort: true, template: idTemplate} |