Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
33a4bd46
Commit
33a4bd46
authored
May 07, 2015
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1159589: migrate autocomplete from yui to jquery
r=dylan,a=glob
parent
7a75256f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
205 additions
and
220 deletions
+205
-220
comment-tagging.js
js/comment-tagging.js
+21
-34
field.js
js/field.js
+83
-105
devbridgeAutocomplete-min.js
...lugins/devbridgeAutocomplete/devbridgeAutocomplete-min.js
+0
-0
license.txt
js/jquery/plugins/devbridgeAutocomplete/license.txt
+21
-0
global.css
skins/standard/global.css
+28
-0
throbber.gif
skins/standard/throbber.gif
+0
-0
prefs.html.tmpl
template/en/default/account/prefs/prefs.html.tmpl
+0
-1
create.html.tmpl
template/en/default/admin/components/create.html.tmpl
+0
-1
edit.html.tmpl
template/en/default/admin/components/edit.html.tmpl
+0
-1
create.html.tmpl
template/en/default/admin/products/create.html.tmpl
+0
-1
create.html.tmpl
template/en/default/attachment/create.html.tmpl
+0
-1
edit.html.tmpl
template/en/default/attachment/edit.html.tmpl
+0
-1
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+1
-1
edit.html.tmpl
template/en/default/bug/edit.html.tmpl
+2
-2
field.html.tmpl
template/en/default/bug/field.html.tmpl
+14
-17
show-header.html.tmpl
template/en/default/bug/show-header.html.tmpl
+2
-2
header.html.tmpl
template/en/default/global/header.html.tmpl
+3
-5
userselect.html.tmpl
template/en/default/global/userselect.html.tmpl
+9
-16
list.html.tmpl
template/en/default/list/list.html.tmpl
+1
-1
queue.html.tmpl
template/en/default/request/queue.html.tmpl
+0
-1
field.html.tmpl
template/en/default/search/field.html.tmpl
+10
-13
form.html.tmpl
template/en/default/search/form.html.tmpl
+5
-13
search-advanced.html.tmpl
template/en/default/search/search-advanced.html.tmpl
+2
-1
search-create-series.html.tmpl
template/en/default/search/search-create-series.html.tmpl
+1
-1
search-report-graph.html.tmpl
template/en/default/search/search-report-graph.html.tmpl
+1
-1
search-report-table.html.tmpl
template/en/default/search/search-report-table.html.tmpl
+1
-1
No files found.
js/comment-tagging.js
View file @
33a4bd46
...
...
@@ -34,40 +34,27 @@ YAHOO.bugzilla.commentTagging = {
});
if
(
!
can_edit
)
return
;
var
ds
=
new
YAHOO
.
util
.
XHRDataSource
(
"jsonrpc.cgi"
);
ds
.
connTimeout
=
30000
;
ds
.
connMethodPost
=
true
;
ds
.
connXhrMode
=
"cancelStaleRequests"
;
ds
.
maxCacheEntries
=
5
;
ds
.
responseSchema
=
{
metaFields
:
{
error
:
"error"
,
jsonRpcId
:
"id"
},
resultsList
:
"result"
};
var
ac
=
new
YAHOO
.
widget
.
AutoComplete
(
'bz_ctag_add'
,
'bz_ctag_autocomp'
,
ds
);
ac
.
maxResultsDisplayed
=
7
;
ac
.
generateRequest
=
function
(
query
)
{
query
=
YAHOO
.
lang
.
trim
(
query
);
YAHOO
.
bugzilla
.
commentTagging
.
last_query
=
query
;
YAHOO
.
bugzilla
.
commentTagging
.
counter
=
YAHOO
.
bugzilla
.
commentTagging
.
counter
+
1
;
YAHOO
.
util
.
Connect
.
setDefaultPostHeader
(
'application/json'
,
true
);
return
YAHOO
.
lang
.
JSON
.
stringify
({
version
:
"1.1"
,
method
:
"Bug.search_comment_tags"
,
id
:
YAHOO
.
bugzilla
.
commentTagging
.
counter
,
params
:
{
Bugzilla_api_token
:
BUGZILLA
.
api_token
,
query
:
query
,
limit
:
10
}
});
};
ac
.
minQueryLength
=
this
.
min_len
;
ac
.
autoHighlight
=
false
;
ac
.
typeAhead
=
true
;
ac
.
queryDelay
=
0.5
;
ac
.
dataReturnEvent
.
subscribe
(
function
(
type
,
args
)
{
args
[
0
].
autoHighlight
=
args
[
2
].
length
==
1
;
$
(
'#bz_ctag_add'
).
devbridgeAutocomplete
({
serviceUrl
:
function
(
query
)
{
return
'rest/bug/comment/tags/'
+
encodeURIComponent
(
query
);
},
params
:
{
Bugzilla_api_token
:
BUGZILLA
.
api_token
},
deferRequestBy
:
250
,
minChars
:
1
,
tabDisabled
:
true
,
transformResult
:
function
(
response
)
{
response
=
$
.
parseJSON
(
response
);
return
{
suggestions
:
$
.
map
(
response
,
function
(
dataItem
)
{
return
{
value
:
dataItem
,
data
:
null
};
})
};
}
});
},
...
...
js/field.js
View file @
33a4bd46
...
...
@@ -805,117 +805,95 @@ function browserCanHideOptions(aSelect) {
/* (end) option hiding code */
/**
*
The Autoselect
*
Autocompletion
*/
YAHOO
.
bugzilla
.
userAutocomplete
=
{
counter
:
0
,
dataSource
:
null
,
generateRequest
:
function
(
enteredText
){
YAHOO
.
bugzilla
.
userAutocomplete
.
counter
=
YAHOO
.
bugzilla
.
userAutocomplete
.
counter
+
1
;
YAHOO
.
util
.
Connect
.
setDefaultPostHeader
(
'application/json'
,
true
);
var
json_object
=
{
method
:
"User.get"
,
id
:
YAHOO
.
bugzilla
.
userAutocomplete
.
counter
,
params
:
[
{
$
(
function
()
{
// single user
function
searchComplete
()
{
var
that
=
$
(
this
);
that
.
data
(
'counter'
,
that
.
data
(
'counter'
)
-
1
);
if
(
that
.
data
(
'counter'
)
===
0
)
that
.
removeClass
(
'autocomplete-running'
);
if
(
document
.
activeElement
!=
this
)
that
.
autocomplete
(
'hide'
);
};
var
options_user
=
{
serviceUrl
:
'rest/user'
,
params
:
{
Bugzilla_api_token
:
BUGZILLA
.
api_token
,
match
:
[
decodeURIComponent
(
enteredText
)
],
include_fields
:
[
"name"
,
"real_name"
]
}
]
};
var
stringified
=
YAHOO
.
lang
.
JSON
.
stringify
(
json_object
);
var
debug
=
{
msg
:
"json-rpc obj debug info"
,
"json obj"
:
json_object
,
"param"
:
stringified
}
YAHOO
.
bugzilla
.
userAutocomplete
.
debug_helper
(
debug
);
return
stringified
;
},
resultListFormat
:
function
(
oResultData
,
enteredText
,
sResultMatch
)
{
return
(
YAHOO
.
lang
.
escapeHTML
(
oResultData
.
real_name
)
+
" ("
+
YAHOO
.
lang
.
escapeHTML
(
oResultData
.
name
)
+
")"
);
},
debug_helper
:
function
(
){
/* used to help debug any errors that might happen */
if
(
typeof
(
console
)
!==
'undefined'
&&
console
!=
null
&&
arguments
.
length
>
0
){
console
.
log
(
"debug helper info:"
,
arguments
);
}
return
true
;
},
init_ds
:
function
(){
this
.
dataSource
=
new
YAHOO
.
util
.
XHRDataSource
(
"jsonrpc.cgi"
);
this
.
dataSource
.
connTimeout
=
30000
;
this
.
dataSource
.
connMethodPost
=
true
;
this
.
dataSource
.
connXhrMode
=
"cancelStaleRequests"
;
this
.
dataSource
.
maxCacheEntries
=
5
;
this
.
dataSource
.
responseSchema
=
{
resultsList
:
"result.users"
,
metaFields
:
{
error
:
"error"
,
jsonRpcId
:
"id"
},
fields
:
[
{
key
:
"name"
},
{
key
:
"real_name"
}
]
};
},
init
:
function
(
field
,
container
,
multiple
)
{
if
(
this
.
dataSource
==
null
){
this
.
init_ds
();
}
var
userAutoComp
=
new
YAHOO
.
widget
.
AutoComplete
(
field
,
container
,
this
.
dataSource
);
// other stuff we might want to do with the autocomplete goes here
userAutoComp
.
maxResultsDisplayed
=
BUGZILLA
.
param
.
maxusermatches
;
userAutoComp
.
generateRequest
=
this
.
generateRequest
;
userAutoComp
.
formatResult
=
this
.
resultListFormat
;
userAutoComp
.
doBeforeLoadData
=
this
.
debug_helper
;
userAutoComp
.
minQueryLength
=
3
;
userAutoComp
.
autoHighlight
=
false
;
// this is a throttle to determine the delay of the query from typing
// set this higher to cause fewer calls to the server
userAutoComp
.
queryDelay
=
0.05
;
userAutoComp
.
useIFrame
=
true
;
userAutoComp
.
resultTypeList
=
false
;
if
(
multiple
==
true
){
userAutoComp
.
delimChar
=
[
","
];
}
}
};
include_fields
:
'name,real_name'
,
limit
:
100
},
paramName
:
'match'
,
deferRequestBy
:
250
,
minChars
:
3
,
tabDisabled
:
true
,
transformResult
:
function
(
response
)
{
response
=
$
.
parseJSON
(
response
);
return
{
suggestions
:
$
.
map
(
response
.
users
,
function
(
dataItem
)
{
return
{
value
:
dataItem
.
name
,
data
:
{
login
:
dataItem
.
name
,
name
:
dataItem
.
real_name
}
};
})
};
},
formatResult
:
function
(
suggestion
,
currentValue
)
{
return
suggestion
.
data
.
name
===
''
?
suggestion
.
data
.
login
:
suggestion
.
data
.
name
+
' ('
+
suggestion
.
data
.
login
+
')'
;
},
onSearchStart
:
function
(
params
)
{
var
that
=
$
(
this
);
params
.
match
=
$
.
trim
(
params
.
match
);
that
.
addClass
(
'autocomplete-running'
);
that
.
data
(
'counter'
,
that
.
data
(
'counter'
)
+
1
);
},
onSearchComplete
:
searchComplete
,
onSearchError
:
searchComplete
};
YAHOO
.
bugzilla
.
fieldAutocomplete
=
{
dataSource
:
[],
init_ds
:
function
(
field
)
{
this
.
dataSource
[
field
]
=
new
YAHOO
.
util
.
LocalDataSource
(
YAHOO
.
bugzilla
.
field_array
[
field
]
);
},
init
:
function
(
field
,
container
)
{
if
(
this
.
dataSource
[
field
]
==
null
)
{
this
.
init_ds
(
field
);
}
var
fieldAutoComp
=
new
YAHOO
.
widget
.
AutoComplete
(
field
,
container
,
this
.
dataSource
[
field
]);
fieldAutoComp
.
maxResultsDisplayed
=
YAHOO
.
bugzilla
.
field_array
[
field
].
length
;
fieldAutoComp
.
formatResult
=
fieldAutoComp
.
formatEscapedResult
;
fieldAutoComp
.
minQueryLength
=
0
;
fieldAutoComp
.
useIFrame
=
true
;
fieldAutoComp
.
delimChar
=
[
","
,
" "
];
fieldAutoComp
.
resultTypeList
=
false
;
fieldAutoComp
.
queryDelay
=
0
;
/* Causes all the possibilities in the field to appear when a user
* focuses on the textbox
*/
fieldAutoComp
.
textboxFocusEvent
.
subscribe
(
function
(){
var
sInputValue
=
YAHOO
.
util
.
Dom
.
get
(
field
).
value
;
if
(
sInputValue
.
length
===
0
&&
YAHOO
.
bugzilla
.
field_array
[
field
].
length
>
0
){
this
.
sendQuery
(
sInputValue
);
this
.
collapseContainer
();
this
.
expandContainer
();
// multiple users (based on single user)
var
options_users
=
{
delimiter
:
/,
\s
*/
,
onSelect
:
function
()
{
this
.
focus
();
},
};
$
.
extend
(
options_users
,
options_user
);
// init user autocomplete fields
$
(
'.bz_autocomplete_user'
)
.
each
(
function
()
{
var
that
=
$
(
this
);
that
.
data
(
'counter'
,
0
);
if
(
that
.
data
(
'multiple'
))
{
that
.
devbridgeAutocomplete
(
options_users
);
}
else
{
that
.
devbridgeAutocomplete
(
options_user
);
}
});
fieldAutoComp
.
dataRequestEvent
.
subscribe
(
function
(
type
,
args
)
{
args
[
0
].
autoHighlight
=
args
[
1
]
!=
''
;
// init autocomplete fields with array of values
$
(
'.bz_autocomplete_values'
)
.
each
(
function
()
{
var
that
=
$
(
this
);
that
.
devbridgeAutocomplete
({
lookup
:
BUGZILLA
.
autocomplete_values
[
that
.
data
(
'values'
)],
tabDisabled
:
true
,
delimiter
:
/,
\s
*/
,
minChars
:
0
,
onSelect
:
function
()
{
this
.
focus
();
}
});
});
}
};
});
/**
* Set the disable email checkbox to true if the user has disabled text
...
...
js/jquery/plugins/devbridgeAutocomplete/devbridgeAutocomplete-min.js
0 → 100644
View file @
33a4bd46
This diff is collapsed.
Click to expand it.
js/jquery/plugins/devbridgeAutocomplete/license.txt
0 → 100644
View file @
33a4bd46
Copyright 2012 DevBridge and other contributors
http://www.devbridge.com/projects/autocomplete/jquery/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
skins/standard/global.css
View file @
33a4bd46
...
...
@@ -1069,3 +1069,31 @@ table.field_value_explanation {
}
/* duplicates.cgi (end) */
/* autocomplete */
.autocomplete-suggestions
{
border
:
1px
solid
#999
;
background
:
#fff
;
color
:
#000
;
overflow
:
auto
;
cursor
:
pointer
;
}
.autocomplete-suggestion
{
padding
:
2px
5px
;
white-space
:
nowrap
;
overflow
:
hidden
;
}
.autocomplete-selected
{
background
:
#426fd9
;
color
:
#FFF
}
.autocomplete-running
{
background-image
:
url("throbber.gif")
!important
;
background-repeat
:
no-repeat
!important
;
background-position
:
right
8px
center
!important
;
}
skins/standard/throbber.gif
0 → 100644
View file @
33a4bd46
723 Bytes
template/en/default/account/prefs/prefs.html.tmpl
View file @
33a4bd46
...
...
@@ -59,7 +59,6 @@
style_urls = ['skins/standard/admin.css']
javascript_urls = ['js/util.js', 'js/field.js', 'js/TUI.js']
doc_section = current_tab.doc_section
yui = ['autocomplete']
%]
[% WRAPPER global/tabs.html.tmpl
...
...
template/en/default/admin/components/create.html.tmpl
View file @
33a4bd46
...
...
@@ -16,7 +16,6 @@
title = title
generate_api_token = 1
style_urls = ['skins/standard/admin.css']
yui = [ 'autocomplete' ]
javascript_urls = [ "js/field.js" ]
%]
...
...
template/en/default/admin/components/edit.html.tmpl
View file @
33a4bd46
...
...
@@ -20,7 +20,6 @@
title = title
generate_api_token = 1
style_urls = ['skins/standard/admin.css']
yui = [ 'autocomplete' ]
javascript_urls = [ "js/field.js" ]
%]
...
...
template/en/default/admin/products/create.html.tmpl
View file @
33a4bd46
...
...
@@ -20,7 +20,6 @@
generate_api_token = 1
style_urls = ['skins/standard/admin.css']
javascript_urls = ['js/util.js', 'js/field.js']
yui = [ 'autocomplete' ]
%]
[% DEFAULT
...
...
template/en/default/attachment/create.html.tmpl
View file @
33a4bd46
...
...
@@ -18,7 +18,6 @@
subheader = subheader
generate_api_token = 1
style_urls = ['skins/standard/bug.css']
yui = [ 'autocomplete' ]
javascript_urls = [ "js/attachment.js", 'js/field.js', "js/util.js", "js/TUI.js" ]
doc_section = "using/editing.html#attachments"
%]
...
...
template/en/default/attachment/edit.html.tmpl
View file @
33a4bd46
...
...
@@ -25,7 +25,6 @@
doc_section = "using/editing.html#attachments"
javascript_urls = ['js/attachment.js', 'js/field.js']
style_urls = ['skins/standard/bug.css']
yui = [ 'autocomplete' ]
bodyclasses = "no_javascript"
%]
...
...
template/en/default/bug/create/create.html.tmpl
View file @
33a4bd46
...
...
@@ -12,7 +12,7 @@
[% PROCESS global/header.html.tmpl
title = title
generate_api_token = 1
yui = [ '
autocomplete', '
calendar', 'datatable', 'button' ]
yui = [ 'calendar', 'datatable', 'button' ]
style_urls = ['skins/standard/bug.css']
javascript_urls = [ "js/attachment.js", "js/util.js",
"js/field.js", "js/TUI.js", "js/bug.js" ]
...
...
template/en/default/bug/edit.html.tmpl
View file @
33a4bd46
...
...
@@ -12,11 +12,11 @@
[% IF user.can_tag_comments %]
<div id="bz_ctag_div" class="bz_default_hidden">
<a href="javascript:void(0)" onclick="YAHOO.bugzilla.commentTagging.hideInput()">x</a>
<
div
>
<
span
>
<input id="bz_ctag_add" size="10" placeholder="add tag"
maxlength="[% constants.MAX_COMMENT_TAG_LENGTH FILTER html %]">
<span id="bz_ctag_autocomp"></span>
</
div
>
</
span
>
</div>
<div id="bz_ctag_error" class="bz_default_hidden">
...
...
template/en/default/bug/field.html.tmpl
View file @
33a4bd46
...
...
@@ -196,23 +196,20 @@
</script>
[% END %]
[% END %]
[% CASE constants.FIELD_TYPE_KEYWORDS %]
<div id="[% field.name FILTER html %]_container">
<input type="text" id="[% field.name FILTER html %]" size="40"
class="text_input" name="[% field.name FILTER html %]"
value="[% value FILTER html %]">
<div id="[% field.name FILTER html %]_autocomplete"></div>
</div>
<script type="text/javascript">
if (typeof YAHOO.bugzilla.field_array === "undefined")
YAHOO.bugzilla.field_array = [];
YAHOO.bugzilla.field_array["[% field.name FILTER js %]"] = [
[%- FOREACH val = possible_values %]
[%-# %]"[% val FILTER js %]"
[%- "," IF NOT loop.last %][% END %]];
YAHOO.bugzilla.fieldAutocomplete.init('[% field.name FILTER js %]',
'[% field.name FILTER js %]_autocomplete');
</script>
[% CASE constants.FIELD_TYPE_KEYWORDS %]
<input type="text" id="[% field.name FILTER html %]" size="40"
class="text_input bz_autocomplete_values"
name="[% field.name FILTER html %]"
data-values="[% field.name FILTER html %]"
value="[% value FILTER html %]">
<script type="text/javascript">
if (typeof BUGZILLA.autocomplete_values === 'undefined')
BUGZILLA.autocomplete_values = [];
BUGZILLA.autocomplete_values['[% field.name FILTER js %]'] = [
[%- FOREACH val = possible_values %]
[%- %]"[% val FILTER js %]"
[%- "," IF NOT loop.last %][% END %]];
</script>
[% END %]
[% ELSE %]
[% SWITCH field.type %]
...
...
template/en/default/bug/show-header.html.tmpl
View file @
33a4bd46
...
...
@@ -24,8 +24,8 @@
[% END %]
[% title = title _ filtered_desc %]
[% generate_api_token = 1 %]
[% yui = [
'autocomplete', 'calendar'
] %]
[% yui.push('container') IF user.can_tag_comments %]
[% yui = [
'calendar'
] %]
[% yui.push('
json', 'connection', '
container') IF user.can_tag_comments %]
[% javascript_urls = [ "js/util.js", "js/field.js", "js/comments.js" ] %]
[% javascript_urls.push("js/bug.js") IF user.id %]
[% javascript_urls.push('js/comment-tagging.js')
...
...
template/en/default/global/header.html.tmpl
View file @
33a4bd46
...
...
@@ -43,7 +43,6 @@
[% IF NOT no_yui %]
[% SET yui_css = {
autocomplete => 1,
calendar => 1,
datatable => 1,
button => 1,
...
...
@@ -54,8 +53,7 @@
# if that module is going to be specified in "yui".
#%]
[% SET yui_deps = {
autocomplete => ['json', 'connection', 'datasource'],
datatable => ['json', 'connection', 'datasource', 'element'],
datatable => ['json', 'connection', 'datasource', 'element'],
} %]
[%# When using certain YUI modules, we need to process certain
...
...
@@ -86,8 +84,8 @@
] %]
[% style_urls.import(jquery_css, jq_css_urls) FILTER null %]
[%# Add
jQuery cookie support
%]
[% jquery.push("cookie") %]
[%# Add
our required jQuery plugins
%]
[% jquery.push("cookie"
, "devbridgeAutocomplete"
) %]
[%# We should be able to set the default value of the header variable
# to the value of the title variable using the DEFAULT directive,
...
...
template/en/default/global/userselect.html.tmpl
View file @
33a4bd46
...
...
@@ -71,10 +71,14 @@
[% END %]
</select>
[% ELSE %]
[% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %]
<div id="[% id FILTER html %]_autocomplete"
[% IF classes %] class="[% classes.join(' ') FILTER html %]" [% END %]>
[% END %]
[%
IF id && feature_enabled('jsonrpc') && Param('ajax_user_autocompletion');
IF !classes.defined;
classes = [];
END;
classes.push("bz_autocomplete_user");
END;
%]
<input
name="[% name FILTER html %]"
value="[% value FILTER html %]"
...
...
@@ -86,17 +90,6 @@
[% IF size %] size="[% size FILTER html %]" [% END %]
[% IF id %] id="[% id FILTER html %]" [% END %]
[% IF mandatory %] required [% END %]
[% IF multiple %] data-multiple="1" [% END %]
>
[% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %]
<div id="[% id FILTER html %]_autocomplete_container"></div>
</div>
<script type="text/javascript">
if( typeof(YAHOO.bugzilla.userAutocomplete) !== 'undefined'
&& YAHOO.bugzilla.userAutocomplete != null){
YAHOO.bugzilla.userAutocomplete.init( "[% id FILTER js %]",
"[% id FILTER js %]_autocomplete_container"
[% IF multiple %], true[% END%]);
}
</script>
[% END %]
[% END %]
template/en/default/list/list.html.tmpl
View file @
33a4bd46
...
...
@@ -61,7 +61,7 @@
title = title
generate_api_token = dotweak
atomlink = "buglist.cgi?$urlquerypart&title=$title&ctype=atom"
yui = [ '
autocomplete', '
calendar' ]
yui = [ 'calendar' ]
javascript_urls = [ "js/util.js", "js/field.js", "js/TUI.js" ]
style_urls = [ "skins/standard/buglist.css" ]
doc_section = "using/finding.html"
...
...
template/en/default/request/queue.html.tmpl
View file @
33a4bd46
...
...
@@ -15,7 +15,6 @@
onload="var f = document.request_form; selectProduct(f.product, f.component, null, null, 'Any');"
javascript_urls=["js/productform.js", "js/field.js"]
style_urls = ['skins/standard/buglist.css']
yui = ['autocomplete']
%]
<script type="text/javascript">
...
...
template/en/default/search/field.html.tmpl
View file @
33a4bd46
...
...
@@ -35,22 +35,19 @@
types = types,
selected = type_selected
%]
<div id="[% field.name FILTER html %]_container">
<input name="[% field.name FILTER html %]"
id="[% field.name FILTER html %]" size="40"
[% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
value="[% value FILTER html %]" [% 'autofocus' IF focus %]>
<div id="[% field.name FILTER html %]_autocomplete"></div>
</div>
<input name="[% field.name FILTER html %]"
id="[% field.name FILTER html %]" size="40"
class="bz_autocomplete_values"
[% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
value="[% value FILTER html %]" [% 'autofocus' IF focus %]
data-values="[% field.name FILTER html %]">
<script type="text/javascript">
if (typeof
YAHOO.bugzilla.field_array === "undefined"
)
YAHOO.bugzilla.field_array
= [];
YAHOO.bugzilla.field_array["[% field.name FILTER js %]"
] = [
if (typeof
BUGZILLA.autocomplete_values === 'undefined'
)
BUGZILLA.autocomplete_values
= [];
BUGZILLA.autocomplete_values['[% field.name FILTER js %]'
] = [
[%- FOREACH val = possible_values %]
[%-
#
%]"[% val FILTER js %]"
[%- %]"[% val FILTER js %]"
[%- "," IF NOT loop.last %][% END %]];
YAHOO.bugzilla.fieldAutocomplete.init('[% field.name FILTER js %]',
'[% field.name FILTER js %]_autocomplete');
</script>
[% CASE [constants.FIELD_TYPE_DATETIME, constants.FIELD_TYPE_DATE] %]
[% INCLUDE "bug/field-label.html.tmpl"
...
...
template/en/default/search/form.html.tmpl
View file @
33a4bd46
...
...
@@ -268,19 +268,11 @@ TUI_hide_default('information_query');
[% " selected" IF default.emailtype.$n == qv.name %]>[% qv.description %]</option>
[% END %]
</select>
[% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') %]
<div id="email[% n %]_autocomplete">
[% END %]
<input name="email[% n %]" class="email" id="email[% n %]"
value="[% default.email.$n FILTER html %]">
[% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') %]
<div id="email[% n %]_autocomplete_container"></div>
</div>
<script type="text/javascript">
YAHOO.bugzilla.userAutocomplete.init( "email[% n %]",
"email[% n %]_autocomplete_container");
</script>
[% END %]
<input
name="email[% n %]"
class="email [% "bz_autocomplete_user" IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') %]"
id="email[% n %]"
value="[% default.email.$n FILTER html %]">
</div>
[% END %]
[% Hook.process('email_numbering_end') %]
...
...
template/en/default/search/search-advanced.html.tmpl
View file @
33a4bd46
...
...
@@ -26,7 +26,8 @@ function remove_token() {
[% PROCESS global/header.html.tmpl
title = "Search for $terms.bugs"
yui = [ 'autocomplete', 'calendar' ]
generate_api_token = 1
yui = [ 'calendar' ]
javascript = javascript
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js"]
style_urls = ['skins/standard/buglist.css']
...
...
template/en/default/search/search-create-series.html.tmpl
View file @
33a4bd46
...
...
@@ -19,7 +19,7 @@
[% PROCESS global/header.html.tmpl
title = "Create New Data Set"
onload = "doOnSelectProduct(0);"
yui = [ '
autocomplete', '
calendar' ]
yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
...
...
template/en/default/search/search-report-graph.html.tmpl
View file @
33a4bd46
...
...
@@ -18,7 +18,7 @@ var queryform = "reportform"
[% PROCESS global/header.html.tmpl
title = "Generate Graphical Report"
onload = "doOnSelectProduct(0); chartTypeChanged()"
yui = [ '
autocomplete', '
calendar' ]
yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
...
...
template/en/default/search/search-report-table.html.tmpl
View file @
33a4bd46
...
...
@@ -18,7 +18,7 @@ var queryform = "reportform"
[% PROCESS global/header.html.tmpl
title = "Generate Tabular Report"
onload = "doOnSelectProduct(0)"
yui = [ '
autocomplete', '
calendar' ]
yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
...
...
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