This file contains 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
# Group | |
group: | |
edit: | |
submit: 更新群組 | |
show: | |
name: 群組名稱 | |
new: | |
submit: 建立群組 | |
flash: | |
updated: 群組已被更新 |
This file contains 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 dateFormat = (function () { | |
var keywords = { | |
Y: 'getFullYear', | |
m: 'getUTCMonth', | |
d: 'getUTCDate', | |
H: 'getUTCHours', | |
i: 'getUTCMinutes', | |
s: 'getUTCSeconds', | |
u: 'getUTCMilliseconds' | |
}; |
This file contains 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 getElementsByAttribute = function (tagname, attr, value) { | |
if (arguments.length < 3) { | |
value = attr; | |
attr = tagname; | |
tagname = '*'; | |
} | |
var match = []; | |
var eles = document.getElementsByTagName(tagname); | |
var i = eles.length; | |
while (i) { |
This file contains 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 tmp = $data; | |
$data = {}; | |
tmp.split(',').forEach(function (key, val) { | |
$data[key] = val; | |
}); | |
console.log($data.background); // output: green |
This file contains 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
<div list-input list="spot.transport" ng-init="types={a: '公車', b: '太空船'}" class="control-group"> | |
<label class="control-label">交通方式</label> | |
<div class="controls"> | |
<select ng-model="data.type" ng-options="key as val for (key, val) in types"> | |
</select> | |
<input type="text" ng-model="data.detail" placeholder="123 OO站下車,右轉後直走兩分鐘, 捷運|捷運xx站n號出口出來後直走2分鐘" class="m-wrap medium"> | |
<button type="button" class="add btn" ng-click="push()" href="#">新增</button> | |
<ul class="rows"> | |
<li ng-repeat="i in list"><a ng-click="remove($index)" stop-event href="">刪除</a> || types[i.type] || - || i.detail ||</li> | |
</ul> |
This file contains 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 errors = require('errors')('{level:x}{module:xxx}-{code:xx}'); | |
errors.setLevel('System', '1'); | |
errors.setLevel('Service', '2'); | |
errors.setModule('default', '000'); | |
errors.System.setModule('module1', '001'); | |
errors.System.setModule('module2', '002'); |
This file contains 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-router> | |
<app-route path="/" templateUrl="/index.html"></app-route> | |
</app-router> |
This file contains 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
travel_info: [ | |
{ | |
id: "1713850117022697954", | |
title: "來自南台灣最溫暖的手作包", | |
file_list: [ ], | |
page_view: 11, | |
links: null, | |
start_at: { | |
date: "2013-12-09 08:30:39", | |
timezone_type: 3, |
This file contains 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.getPropertyDescriptor || (Object.getPropertyDescriptor = function (obj, name) { | |
var desc; | |
while (obj) { | |
desc = Object.getOwnPropertyDescriptor(obj, name); | |
if (desc) { | |
desc.configurable = true; | |
return desc; | |
} | |
obj = Object.getPrototypeOf(obj); | |
} |
This file contains 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
'use strict'; | |
var utils = module.exports = {}; | |
utils.args = function (defval, names) { | |
defval || (defval = {}); | |
names || (names = []); | |
var map = {}; |