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
<!-- メール送信系フォーム内と仮定 --> | |
<select name="choice"> | |
<option value="あー"{choice:selected#あー}>あー</option> | |
<option value="いー"{choice:selected#いー}>いー</option> | |
<option value="うー"{choice:selected#うー}>うー</option> | |
</select> | |
<input type="hidden" name="field[]" value="choice" /> |
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
$cid = 10; // 任意のcid | |
$DB = DB::singleton(dsn()); | |
$SQL = SQL::newSelect('category'); | |
$SQL->addSelect('category_id'); | |
$SQL->addSelect('category_name'); | |
$SQL->addSelect('category_code'); | |
ACMS_Filter::categoryTree($SQL, $cid, 'ancestor'); | |
$SQL->addOrder('category_left', 'ASC'); | |
$all = $DB->query($SQL->get(dsn()), 'all'); |
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
<?php | |
require_once ACMS_LIB_DIR.'GET.php'; | |
class ACMS_GET_Util_JSONP extends ACMS_GET | |
{ | |
function get() | |
{ | |
return $this->Get->get('jsoncallback').'({html: '.json_encode($this->tpl).'});'; | |
} |
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として取得する | |
* | |
* @param {Node} form | |
* @return {Object} | |
*/ | |
function getFormData(form) { | |
if (form.tagName !== 'FORM') { | |
throw new TypeError('Argument must be HTMLFormElement.'); | |
} |
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
function AdaptiveGetElementsByClassName(clazz) { | |
var elems = this.getElementsByTagName('*'), | |
evClass = ' '+clazz+' ', | |
i = 0, | |
e = null, | |
rv = []; | |
while ( e = elems[i] ) { | |
if ( e.nodeType === Node.ELEMENT_NODE && (' '+e.className+' ').indexOf(evClass) !== -1 ) { | |
rv.push(e); |
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
// hayate.js内の関数から改変 | |
function toArrayCopy(list) { | |
var rv= new Array(list.length), i = 0, iz = list.length; | |
for (; i<iz; i++) { | |
rv[i]= list[i]; | |
} | |
return rv; | |
} |
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
[alias] | |
# pretty graph -> http://d.hatena.ne.jp/sugyan/20111103/1320247493 | |
tr = log --graph --pretty='format:%C(yellow)%h%Creset %s %Cgreen(%an)%Creset %Cred%d%Creset' | |
# back correct | |
bc = commit --amend -m | |
# untracked files | |
ut = git ls-files -o --exclude-from=.gitignore | |
# stash | |
s = stash | |
sa = stash apply |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xml:lang="ja" lang="ja" dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Test</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(function() { | |
var results = document.getElementById('results'), | |
exprCollection = [ | |
':text', ':input', ':password', ':radio', 'checkbox', |
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
// blinkメソッドを追加 | |
jQuery.fn.extend({ | |
blink: function (callback) { | |
var self = this; | |
self.fadeOut(500, function() { | |
self.fadeIn(200, function() { | |
callback && callback(); | |
}); | |
}); | |
} |
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
<h3>サブナビゲーション</h3> | |
<table class="adminTable"> | |
<tr> | |
<th></th> | |
<th>ラベル</th> | |
<th>リンク先</th> | |
</tr> | |
<tr> | |
<td> | |
1 |