Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
7960ccdf
Commit
7960ccdf
authored
Mar 16, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tab to spaces conversion.
parent
8cb144c5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
20 deletions
+22
-20
toolbar.js
extensions/debug/assets/toolbar.js
+5
-5
gii.js
extensions/gii/assets/gii.js
+10
-8
yii.activeForm.js
framework/assets/yii.activeForm.js
+3
-3
yii.captcha.js
framework/assets/yii.captcha.js
+3
-3
yii.gridView.js
framework/assets/yii.gridView.js
+0
-0
yii.js
framework/assets/yii.js
+1
-1
yii.validation.js
framework/assets/yii.validation.js
+0
-0
No files found.
extensions/debug/assets/toolbar.js
View file @
7960ccdf
(
function
()
{
var
ajax
=
function
(
url
,
settings
)
{
(
function
()
{
var
ajax
=
function
(
url
,
settings
)
{
var
xhr
=
window
.
XMLHttpRequest
?
new
XMLHttpRequest
()
:
new
ActiveXObject
(
'Microsoft.XMLHTTP'
);
settings
=
settings
||
{};
xhr
.
open
(
settings
.
method
||
'GET'
,
url
,
true
);
xhr
.
setRequestHeader
(
'X-Requested-With'
,
'XMLHttpRequest'
);
xhr
.
onreadystatechange
=
function
(
state
)
{
xhr
.
onreadystatechange
=
function
(
state
)
{
if
(
xhr
.
readyState
==
4
)
{
if
(
xhr
.
status
==
200
&&
settings
.
success
)
{
settings
.
success
(
xhr
);
...
...
@@ -21,7 +21,7 @@
e
.
style
.
display
=
'block'
;
var
url
=
e
.
getAttribute
(
'data-url'
);
ajax
(
url
,
{
success
:
function
(
xhr
)
{
success
:
function
(
xhr
)
{
var
div
=
document
.
createElement
(
'div'
);
div
.
innerHTML
=
xhr
.
responseText
;
e
.
parentNode
.
replaceChild
(
div
,
e
);
...
...
@@ -33,7 +33,7 @@
}
}
},
error
:
function
(
xhr
)
{
error
:
function
(
xhr
)
{
e
.
innerHTML
=
xhr
.
responseText
;
}
});
...
...
extensions/gii/assets/gii.js
View file @
7960ccdf
...
...
@@ -55,8 +55,8 @@ yii.gii = (function ($) {
var
filesSelector
=
'a.'
+
$modal
.
data
(
'action'
);
var
$files
=
$
(
filesSelector
);
var
index
=
$files
.
filter
(
'[href="'
+
$link
.
attr
(
'href'
)
+
'"]'
).
index
(
filesSelector
);
var
$prev
=
$files
.
eq
(
index
-
1
);
var
$next
=
$files
.
eq
((
index
+
1
==
$files
.
length
?
0
:
index
+
1
));
var
$prev
=
$files
.
eq
(
index
-
1
);
var
$next
=
$files
.
eq
((
index
+
1
==
$files
.
length
?
0
:
index
+
1
));
$modal
.
find
(
'.modal-previous'
).
attr
(
'href'
,
$prev
.
attr
(
'href'
)).
data
(
'title'
,
$prev
.
data
(
'title'
));
$modal
.
find
(
'.modal-next'
).
attr
(
'href'
,
$next
.
attr
(
'href'
)).
data
(
'title'
,
$next
.
data
(
'title'
));
}
...
...
@@ -70,12 +70,12 @@ yii.gii = (function ($) {
return
false
;
});
$
(
'#preview-modal'
).
on
(
'keydown'
,
function
(
e
)
{
$
(
'#preview-modal'
).
on
(
'keydown'
,
function
(
e
)
{
if
(
e
.
keyCode
===
37
)
{
$
(
'.modal-previous'
).
trigger
(
'click'
);
}
else
if
(
e
.
keyCode
===
39
)
{
}
else
if
(
e
.
keyCode
===
39
)
{
$
(
'.modal-next'
).
trigger
(
'click'
);
}
else
if
(
e
.
keyCode
===
82
)
{
}
else
if
(
e
.
keyCode
===
82
)
{
$
(
'.modal-refresh'
).
trigger
(
'click'
);
}
});
...
...
@@ -95,12 +95,14 @@ yii.gii = (function ($) {
return
{
autocomplete
:
function
(
counter
,
data
)
{
var
datum
=
new
Bloodhound
({
datumTokenizer
:
function
(
d
){
return
Bloodhound
.
tokenizers
.
whitespace
(
d
.
word
);},
datumTokenizer
:
function
(
d
)
{
return
Bloodhound
.
tokenizers
.
whitespace
(
d
.
word
);
},
queryTokenizer
:
Bloodhound
.
tokenizers
.
whitespace
,
local
:
data
});
datum
.
initialize
();
jQuery
(
'.typeahead-'
+
counter
).
typeahead
(
null
,
{
displayKey
:
'word'
,
source
:
datum
.
ttAdapter
()});
jQuery
(
'.typeahead-'
+
counter
).
typeahead
(
null
,
{
displayKey
:
'word'
,
source
:
datum
.
ttAdapter
()});
},
init
:
function
()
{
initHintBlocks
();
...
...
@@ -109,7 +111,7 @@ yii.gii = (function ($) {
initConfirmationCheckboxes
();
// model generator: hide class name input when table name input contains *
$
(
'#model-generator #generator-tablename'
).
on
(
'change'
,
function
()
{
$
(
'#model-generator #generator-tablename'
).
on
(
'change'
,
function
()
{
$
(
'#model-generator .field-generator-modelclass'
).
toggle
(
$
(
this
).
val
().
indexOf
(
'*'
)
==
-
1
);
}).
change
();
...
...
framework/assets/yii.activeForm.js
View file @
7960ccdf
...
...
@@ -121,7 +121,7 @@
});
},
data
:
function
()
{
data
:
function
()
{
return
this
.
data
(
'yiiActiveForm'
);
},
...
...
@@ -205,7 +205,7 @@
$
.
each
(
attributes
,
function
(
i
,
attribute
)
{
var
$input
=
findInput
(
$form
,
attribute
);
if
(
attribute
.
validateOnChange
)
{
$input
.
on
(
'change.yiiActiveForm'
,
function
()
{
$input
.
on
(
'change.yiiActiveForm'
,
function
()
{
validateAttribute
(
$form
,
attribute
,
false
);
}).
on
(
'blur.yiiActiveForm'
,
function
()
{
if
(
attribute
.
status
==
0
||
attribute
.
status
==
1
)
{
...
...
@@ -388,7 +388,7 @@
if
(
type
===
'checkbox'
||
type
===
'radio'
)
{
var
$realInput
=
$input
.
filter
(
':checked'
);
if
(
!
$realInput
.
length
)
{
$realInput
=
$form
.
find
(
'input[type=hidden][name="'
+
$input
.
prop
(
'name'
)
+
'"]'
);
$realInput
=
$form
.
find
(
'input[type=hidden][name="'
+
$input
.
prop
(
'name'
)
+
'"]'
);
}
return
$realInput
.
val
();
}
else
{
...
...
framework/assets/yii.captcha.js
View file @
7960ccdf
...
...
@@ -35,7 +35,7 @@
settings
:
settings
});
$e
.
on
(
'click.yiiCaptcha'
,
function
()
{
$e
.
on
(
'click.yiiCaptcha'
,
function
()
{
methods
.
refresh
.
apply
(
$e
);
return
false
;
});
...
...
@@ -50,7 +50,7 @@
url
:
$e
.
data
(
'yiiCaptcha'
).
settings
.
refreshUrl
,
dataType
:
'json'
,
cache
:
false
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
$e
.
attr
(
'src'
,
data
.
url
);
$
(
'body'
).
data
(
settings
.
hashKey
,
[
data
.
hash1
,
data
.
hash2
]);
}
...
...
@@ -64,7 +64,7 @@
});
},
data
:
function
()
{
data
:
function
()
{
return
this
.
data
(
'yiiCaptcha'
);
}
};
...
...
framework/assets/yii.gridView.js
View file @
7960ccdf
framework/assets/yii.js
View file @
7960ccdf
...
...
@@ -236,7 +236,7 @@ yii = (function ($) {
return
this
.
src
.
charAt
(
0
)
===
'/'
?
hostInfo
+
this
.
src
:
this
.
src
;
}).
toArray
();
$
.
ajaxPrefilter
(
'script'
,
function
(
options
,
originalOptions
,
xhr
)
{
if
(
options
.
dataType
==
'jsonp'
)
{
if
(
options
.
dataType
==
'jsonp'
)
{
return
;
}
var
url
=
options
.
url
.
charAt
(
0
)
===
'/'
?
hostInfo
+
options
.
url
:
options
.
url
;
...
...
framework/assets/yii.validation.js
View file @
7960ccdf
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment