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
| (function() { | |
| window.Feedback = (function(){ | |
| var _initialized; | |
| function Feedback(){} | |
| _initialized = false; | |
| Feedback.init = function(options){ | |
| } | |
| Feedback.prototype.default_options = { |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Rich Text Editor</title> | |
| <script type="text/javascript"> | |
| var oDoc, sDefTxt; | |
| function initDoc() { | |
| oDoc = document.getElementById("textBox"); | |
| sDefTxt = oDoc.innerHTML; |
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
| data:text/html,<html lang="en"><head><style> html,body { height: 100% } #note { width: 100%; height: 100% } </style> <script> var note, html, timeout; window.addEventListener('load', function() { note = document.getElementById('note'); html = document.getElementsByTagName('html')[0]; html.addEventListener('keyup', function(ev) { if (timeout) clearTimeout(timeout); timeout = setTimeout(saveNote, 100); }); restoreNote(); note.focus(); }); function saveNote() { localStorage.note = note.innerText; timeout = null; } function restoreNote() { note.innerText = localStorage.note || ''; } </script> </head><body><h1>Notepad (type below, notes persist)</h1> <p id="note" contenteditable=""></p> </body></html> |
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
| #client端代码 | |
| #点击添加的时候 | |
| @socket.emit 'newItem', newItem if @socket | |
| #点击加入的时候 | |
| joinList: -> | |
| @socket = io.connect("http://localhost:3000") | |
| @socket.on 'connect', => | |
| @socket.emit 'joinList', @$joinListName.val() | |
| @socket.on 'syncItems', (items) => |
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
| import os | |
| import urllib | |
| def ensure_dir(f): | |
| d = os.path.dirname(f) | |
| if not os.path.exists(d): | |
| os.makedirs(d) | |
| DOWNLOADS_DIR = 'F:/1Codes/0Web/bootstrap-awesome' #change window splash |
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 Ext.ux.plugin.ListActions | |
| * @author Weston Nielson <wnielson@github> | |
| * | |
| * This plugin adds the ability to select multiple items in a list and then | |
| * perform certain actions on the selected items. | |
| * | |
| * @example miniphone preview | |
| * Ext.create('Ext.List', { | |
| * fullscreen: true, |
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
| Ext.application({ | |
| name: 'MyApp', | |
| requires: [ | |
| 'Ext.MessageBox' | |
| ], | |
| views: ['Main'], | |
| launch: function() { | |
| // Destroy the #appLoadingIndicator element |
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
| app.views.Home = Ext.extend(Ext.Panel, { | |
| title: 'Home', | |
| iconCls: 'home', | |
| dockedItems: [ | |
| { | |
| dock: 'top', | |
| xtype: 'toolbar', | |
| title: '<img class="logo" src="app/images/logo.png" />', | |
| } |
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
| /** | |
| * @author Andrea Cammarata (@AndreaCammarata) | |
| * @class RSS.controller.Feeds | |
| * @extends Ext.app.Controller | |
| * Core controllers which handles all the | |
| * Feeds and News routes and views. | |
| * This class could be considered as the real application Engine. | |
| */ | |
| Ext.define('RSS.controller.Feeds', { | |
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
| Repos.Views.List = Backbone.View.extend({ | |
| initialize: function() { | |
| // Display a loading indication whenever the Collection is fetching. | |
| this.collection.on("fetch", function() { | |
| this.html("<img src='/assets/img/spinner.gif'>"); | |
| }, this); | |
| // Automatically re-render whenever the Collection is populated. | |
| this.collection.on("reset", this.render, this); | |
| } |