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
| <link rel="import" href="../core-scaffold/core-scaffold.html"> | |
| <link rel="import" href="../core-header-panel/core-header-panel.html"> | |
| <link rel="import" href="../core-menu/core-menu.html"> | |
| <link rel="import" href="../core-item/core-item.html"> | |
| <link rel="import" href="../core-icon-button/core-icon-button.html"> | |
| <link rel="import" href="../core-toolbar/core-toolbar.html"> | |
| <link rel="import" href="../core-menu/core-submenu.html"> | |
| <polymer-element name="my-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
| var params = {}; | |
| params.a = '123'; |
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
| async.parallel([ | |
| //Step 1 | |
| function(cb){ | |
| //Code here | |
| cb(null); | |
| },//Step 2 | |
| function(cb){ | |
| //Code here | |
| cb(null); | |
| }, |
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
| //Bad | |
| var contain = $('#container'); | |
| //Good | |
| var $contain = $('#container'); |
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() { | |
| "use strict"; | |
| //Code here | |
| }()); | |
| (function($){ | |
| //Code here | |
| })(jQuery); |
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
| $.ajax({ | |
| url: '/control/param', | |
| dataType: 'json', | |
| data: { | |
| 'id': id | |
| }, | |
| type: 'POST', | |
| success: function(res) { | |
| if (res.success) { | |
| success_msg(res.msg) |
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
| $('#frm').submit(function(e){ | |
| e.preventDefault(); | |
| return false; | |
| }); |
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
| $(document).on('submit', '#frm', function(e) { | |
| e.preventDefault(); | |
| var data = $(this).serialize(); | |
| update(data); | |
| }); |
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 open = []; | |
| if(req.session.OPEN){ | |
| open = JSON.parse(req.session.OPEN); | |
| }//if OPEN | |
| open.push(tid); console.log('[_COpenedTopAdd] OPEN:' + open); | |
| req.session.OPEN = JSON.stringify(open); |
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
| //Guest | |
| if (UID ==-1 && req.cookies.TAG){ | |
| var tag = []; | |
| tag = JSON.parse(req.cookies.TAG); console.log('[]' + tag); | |
| var idx = _.indexOf(tag, TID); | |
| if(idx != -1){ | |
| tag.splice(idx, 1); | |
| console.log('[] Cookie TAG TID:' + TID); | |
| }//if idx | |
| }//if Guest cookies.TAG |
NewerOlder