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 = {
...
@@ -34,40 +34,27 @@ YAHOO.bugzilla.commentTagging = {
});
});
if
(
!
can_edit
)
return
;
if
(
!
can_edit
)
return
;
var
ds
=
new
YAHOO
.
util
.
XHRDataSource
(
"jsonrpc.cgi"
);
$
(
'#bz_ctag_add'
).
devbridgeAutocomplete
({
ds
.
connTimeout
=
30000
;
serviceUrl
:
function
(
query
)
{
ds
.
connMethodPost
=
true
;
return
'rest/bug/comment/tags/'
+
encodeURIComponent
(
query
);
ds
.
connXhrMode
=
"cancelStaleRequests"
;
},
ds
.
maxCacheEntries
=
5
;
params
:
{
ds
.
responseSchema
=
{
Bugzilla_api_token
:
BUGZILLA
.
api_token
metaFields
:
{
error
:
"error"
,
jsonRpcId
:
"id"
},
},
resultsList
:
"result"
deferRequestBy
:
250
,
};
minChars
:
1
,
tabDisabled
:
true
,
var
ac
=
new
YAHOO
.
widget
.
AutoComplete
(
'bz_ctag_add'
,
'bz_ctag_autocomp'
,
ds
);
transformResult
:
function
(
response
)
{
ac
.
maxResultsDisplayed
=
7
;
response
=
$
.
parseJSON
(
response
);
ac
.
generateRequest
=
function
(
query
)
{
return
{
query
=
YAHOO
.
lang
.
trim
(
query
);
suggestions
:
$
.
map
(
response
,
function
(
dataItem
)
{
YAHOO
.
bugzilla
.
commentTagging
.
last_query
=
query
;
return
{
YAHOO
.
bugzilla
.
commentTagging
.
counter
=
YAHOO
.
bugzilla
.
commentTagging
.
counter
+
1
;
value
:
dataItem
,
YAHOO
.
util
.
Connect
.
setDefaultPostHeader
(
'application/json'
,
true
);
data
:
null
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
;
});
});
},
},
...
...
js/field.js
View file @
33a4bd46
...
@@ -805,117 +805,95 @@ function browserCanHideOptions(aSelect) {
...
@@ -805,117 +805,95 @@ function browserCanHideOptions(aSelect) {
/* (end) option hiding code */
/* (end) option hiding code */
/**
/**
*
The Autoselect
*
Autocompletion
*/
*/
YAHOO
.
bugzilla
.
userAutocomplete
=
{
counter
:
0
,
$
(
function
()
{
dataSource
:
null
,
generateRequest
:
function
(
enteredText
){
// single user
YAHOO
.
bugzilla
.
userAutocomplete
.
counter
=
YAHOO
.
bugzilla
.
userAutocomplete
.
counter
+
1
;
function
searchComplete
()
{
YAHOO
.
util
.
Connect
.
setDefaultPostHeader
(
'application/json'
,
true
);
var
that
=
$
(
this
);
var
json_object
=
{
that
.
data
(
'counter'
,
that
.
data
(
'counter'
)
-
1
);
method
:
"User.get"
,
if
(
that
.
data
(
'counter'
)
===
0
)
id
:
YAHOO
.
bugzilla
.
userAutocomplete
.
counter
,
that
.
removeClass
(
'autocomplete-running'
);
params
:
[
{
if
(
document
.
activeElement
!=
this
)
that
.
autocomplete
(
'hide'
);
};
var
options_user
=
{
serviceUrl
:
'rest/user'
,
params
:
{
Bugzilla_api_token
:
BUGZILLA
.
api_token
,
Bugzilla_api_token
:
BUGZILLA
.
api_token
,
match
:
[
decodeURIComponent
(
enteredText
)
],
include_fields
:
'name,real_name'
,
include_fields
:
[
"name"
,
"real_name"
]
limit
:
100
}
]
},
};
paramName
:
'match'
,
var
stringified
=
YAHOO
.
lang
.
JSON
.
stringify
(
json_object
);
deferRequestBy
:
250
,
var
debug
=
{
msg
:
"json-rpc obj debug info"
,
"json obj"
:
json_object
,
minChars
:
3
,
"param"
:
stringified
}
tabDisabled
:
true
,
YAHOO
.
bugzilla
.
userAutocomplete
.
debug_helper
(
debug
);
transformResult
:
function
(
response
)
{
return
stringified
;
response
=
$
.
parseJSON
(
response
);
},
return
{
resultListFormat
:
function
(
oResultData
,
enteredText
,
sResultMatch
)
{
suggestions
:
$
.
map
(
response
.
users
,
function
(
dataItem
)
{
return
(
YAHOO
.
lang
.
escapeHTML
(
oResultData
.
real_name
)
+
" ("
return
{
+
YAHOO
.
lang
.
escapeHTML
(
oResultData
.
name
)
+
")"
);
value
:
dataItem
.
name
,
},
data
:
{
login
:
dataItem
.
name
,
name
:
dataItem
.
real_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
);
},
}
formatResult
:
function
(
suggestion
,
currentValue
)
{
return
true
;
return
suggestion
.
data
.
name
===
''
?
},
suggestion
.
data
.
login
:
suggestion
.
data
.
name
+
' ('
+
suggestion
.
data
.
login
+
')'
;
init_ds
:
function
(){
},
this
.
dataSource
=
new
YAHOO
.
util
.
XHRDataSource
(
"jsonrpc.cgi"
);
onSearchStart
:
function
(
params
)
{
this
.
dataSource
.
connTimeout
=
30000
;
var
that
=
$
(
this
);
this
.
dataSource
.
connMethodPost
=
true
;
params
.
match
=
$
.
trim
(
params
.
match
);
this
.
dataSource
.
connXhrMode
=
"cancelStaleRequests"
;
that
.
addClass
(
'autocomplete-running'
);
this
.
dataSource
.
maxCacheEntries
=
5
;
that
.
data
(
'counter'
,
that
.
data
(
'counter'
)
+
1
);
this
.
dataSource
.
responseSchema
=
{
},
resultsList
:
"result.users"
,
onSearchComplete
:
searchComplete
,
metaFields
:
{
error
:
"error"
,
jsonRpcId
:
"id"
},
onSearchError
:
searchComplete
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
=
[
","
];
}
}
};
YAHOO
.
bugzilla
.
fieldAutocomplete
=
{
// multiple users (based on single user)
dataSource
:
[],
var
options_users
=
{
init_ds
:
function
(
field
)
{
delimiter
:
/,
\s
*/
,
this
.
dataSource
[
field
]
=
onSelect
:
function
()
{
new
YAHOO
.
util
.
LocalDataSource
(
YAHOO
.
bugzilla
.
field_array
[
field
]
);
this
.
focus
();
},
},
init
:
function
(
field
,
container
)
{
};
if
(
this
.
dataSource
[
field
]
==
null
)
{
$
.
extend
(
options_users
,
options_user
);
this
.
init_ds
(
field
);
}
// init user autocomplete fields
var
fieldAutoComp
=
$
(
'.bz_autocomplete_user'
)
new
YAHOO
.
widget
.
AutoComplete
(
field
,
container
,
this
.
dataSource
[
field
]);
.
each
(
function
()
{
fieldAutoComp
.
maxResultsDisplayed
=
YAHOO
.
bugzilla
.
field_array
[
field
].
length
;
var
that
=
$
(
this
);
fieldAutoComp
.
formatResult
=
fieldAutoComp
.
formatEscapedResult
;
that
.
data
(
'counter'
,
0
);
fieldAutoComp
.
minQueryLength
=
0
;
if
(
that
.
data
(
'multiple'
))
{
fieldAutoComp
.
useIFrame
=
true
;
that
.
devbridgeAutocomplete
(
options_users
);
fieldAutoComp
.
delimChar
=
[
","
,
" "
];
}
fieldAutoComp
.
resultTypeList
=
false
;
else
{
fieldAutoComp
.
queryDelay
=
0
;
that
.
devbridgeAutocomplete
(
options_user
);
/* 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
();
}
}
});
});
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
* 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 {
...
@@ -1069,3 +1069,31 @@ table.field_value_explanation {
}
}
/* duplicates.cgi (end) */
/* 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 @@
...
@@ -59,7 +59,6 @@
style_urls = ['skins/standard/admin.css']
style_urls = ['skins/standard/admin.css']
javascript_urls = ['js/util.js', 'js/field.js', 'js/TUI.js']
javascript_urls = ['js/util.js', 'js/field.js', 'js/TUI.js']
doc_section = current_tab.doc_section
doc_section = current_tab.doc_section
yui = ['autocomplete']
%]
%]
[% WRAPPER global/tabs.html.tmpl
[% WRAPPER global/tabs.html.tmpl
...
...
template/en/default/admin/components/create.html.tmpl
View file @
33a4bd46
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
title = title
title = title
generate_api_token = 1
generate_api_token = 1
style_urls = ['skins/standard/admin.css']
style_urls = ['skins/standard/admin.css']
yui = [ 'autocomplete' ]
javascript_urls = [ "js/field.js" ]
javascript_urls = [ "js/field.js" ]
%]
%]
...
...
template/en/default/admin/components/edit.html.tmpl
View file @
33a4bd46
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
title = title
title = title
generate_api_token = 1
generate_api_token = 1
style_urls = ['skins/standard/admin.css']
style_urls = ['skins/standard/admin.css']
yui = [ 'autocomplete' ]
javascript_urls = [ "js/field.js" ]
javascript_urls = [ "js/field.js" ]
%]
%]
...
...
template/en/default/admin/products/create.html.tmpl
View file @
33a4bd46
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
generate_api_token = 1
generate_api_token = 1
style_urls = ['skins/standard/admin.css']
style_urls = ['skins/standard/admin.css']
javascript_urls = ['js/util.js', 'js/field.js']
javascript_urls = ['js/util.js', 'js/field.js']
yui = [ 'autocomplete' ]
%]
%]
[% DEFAULT
[% DEFAULT
...
...
template/en/default/attachment/create.html.tmpl
View file @
33a4bd46
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
subheader = subheader
subheader = subheader
generate_api_token = 1
generate_api_token = 1
style_urls = ['skins/standard/bug.css']
style_urls = ['skins/standard/bug.css']
yui = [ 'autocomplete' ]
javascript_urls = [ "js/attachment.js", 'js/field.js', "js/util.js", "js/TUI.js" ]
javascript_urls = [ "js/attachment.js", 'js/field.js', "js/util.js", "js/TUI.js" ]
doc_section = "using/editing.html#attachments"
doc_section = "using/editing.html#attachments"
%]
%]
...
...
template/en/default/attachment/edit.html.tmpl
View file @
33a4bd46
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
doc_section = "using/editing.html#attachments"
doc_section = "using/editing.html#attachments"
javascript_urls = ['js/attachment.js', 'js/field.js']
javascript_urls = ['js/attachment.js', 'js/field.js']
style_urls = ['skins/standard/bug.css']
style_urls = ['skins/standard/bug.css']
yui = [ 'autocomplete' ]
bodyclasses = "no_javascript"
bodyclasses = "no_javascript"
%]
%]
...
...
template/en/default/bug/create/create.html.tmpl
View file @
33a4bd46
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
[% PROCESS global/header.html.tmpl
[% PROCESS global/header.html.tmpl
title = title
title = title
generate_api_token = 1
generate_api_token = 1
yui = [ '
autocomplete', '
calendar', 'datatable', 'button' ]
yui = [ 'calendar', 'datatable', 'button' ]
style_urls = ['skins/standard/bug.css']
style_urls = ['skins/standard/bug.css']
javascript_urls = [ "js/attachment.js", "js/util.js",
javascript_urls = [ "js/attachment.js", "js/util.js",
"js/field.js", "js/TUI.js", "js/bug.js" ]
"js/field.js", "js/TUI.js", "js/bug.js" ]
...
...
template/en/default/bug/edit.html.tmpl
View file @
33a4bd46
...
@@ -12,11 +12,11 @@
...
@@ -12,11 +12,11 @@
[% IF user.can_tag_comments %]
[% IF user.can_tag_comments %]
<div id="bz_ctag_div" class="bz_default_hidden">
<div id="bz_ctag_div" class="bz_default_hidden">
<a href="javascript:void(0)" onclick="YAHOO.bugzilla.commentTagging.hideInput()">x</a>
<a href="javascript:void(0)" onclick="YAHOO.bugzilla.commentTagging.hideInput()">x</a>
<
div
>
<
span
>
<input id="bz_ctag_add" size="10" placeholder="add tag"
<input id="bz_ctag_add" size="10" placeholder="add tag"
maxlength="[% constants.MAX_COMMENT_TAG_LENGTH FILTER html %]">
maxlength="[% constants.MAX_COMMENT_TAG_LENGTH FILTER html %]">
<span id="bz_ctag_autocomp"></span>
<span id="bz_ctag_autocomp"></span>
</
div
>
</
span
>
</div>
</div>
<div id="bz_ctag_error" class="bz_default_hidden">
<div id="bz_ctag_error" class="bz_default_hidden">
...
...
template/en/default/bug/field.html.tmpl
View file @
33a4bd46
...
@@ -196,23 +196,20 @@
...
@@ -196,23 +196,20 @@
</script>
</script>
[% END %]
[% END %]
[% END %]
[% END %]
[% CASE constants.FIELD_TYPE_KEYWORDS %]
[% CASE constants.FIELD_TYPE_KEYWORDS %]
<div id="[% field.name FILTER html %]_container">
<input type="text" id="[% field.name FILTER html %]" size="40"
<input type="text" id="[% field.name FILTER html %]" size="40"
class="text_input bz_autocomplete_values"
class="text_input" name="[% field.name FILTER html %]"
name="[% field.name FILTER html %]"
value="[% value FILTER html %]">
data-values="[% field.name FILTER html %]"
<div id="[% field.name FILTER html %]_autocomplete"></div>
value="[% value FILTER html %]">
</div>
<script type="text/javascript">
<script type="text/javascript">
if (typeof BUGZILLA.autocomplete_values === 'undefined')
if (typeof YAHOO.bugzilla.field_array === "undefined")
BUGZILLA.autocomplete_values = [];
YAHOO.bugzilla.field_array = [];
BUGZILLA.autocomplete_values['[% field.name FILTER js %]'] = [
YAHOO.bugzilla.field_array["[% field.name FILTER js %]"] = [
[%- FOREACH val = possible_values %]
[%- FOREACH val = possible_values %]
[%- %]"[% val FILTER js %]"
[%-# %]"[% val FILTER js %]"
[%- "," IF NOT loop.last %][% END %]];
[%- "," IF NOT loop.last %][% END %]];
</script>
YAHOO.bugzilla.fieldAutocomplete.init('[% field.name FILTER js %]',
'[% field.name FILTER js %]_autocomplete');
</script>
[% END %]
[% END %]
[% ELSE %]
[% ELSE %]
[% SWITCH field.type %]
[% SWITCH field.type %]
...
...
template/en/default/bug/show-header.html.tmpl
View file @
33a4bd46
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
[% END %]
[% END %]
[% title = title _ filtered_desc %]
[% title = title _ filtered_desc %]
[% generate_api_token = 1 %]
[% generate_api_token = 1 %]
[% yui = [
'autocomplete', 'calendar'
] %]
[% yui = [
'calendar'
] %]
[% yui.push('container') IF user.can_tag_comments %]
[% yui.push('
json', 'connection', '
container') IF user.can_tag_comments %]
[% javascript_urls = [ "js/util.js", "js/field.js", "js/comments.js" ] %]
[% javascript_urls = [ "js/util.js", "js/field.js", "js/comments.js" ] %]
[% javascript_urls.push("js/bug.js") IF user.id %]
[% javascript_urls.push("js/bug.js") IF user.id %]
[% javascript_urls.push('js/comment-tagging.js')
[% javascript_urls.push('js/comment-tagging.js')
...
...
template/en/default/global/header.html.tmpl
View file @
33a4bd46
...
@@ -43,7 +43,6 @@
...
@@ -43,7 +43,6 @@
[% IF NOT no_yui %]
[% IF NOT no_yui %]
[% SET yui_css = {
[% SET yui_css = {
autocomplete => 1,
calendar => 1,
calendar => 1,
datatable => 1,
datatable => 1,
button => 1,
button => 1,
...
@@ -54,8 +53,7 @@
...
@@ -54,8 +53,7 @@
# if that module is going to be specified in "yui".
# if that module is going to be specified in "yui".
#%]
#%]
[% SET yui_deps = {
[% 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
[%# When using certain YUI modules, we need to process certain
...
@@ -86,8 +84,8 @@
...
@@ -86,8 +84,8 @@
] %]
] %]
[% style_urls.import(jquery_css, jq_css_urls) FILTER null %]
[% style_urls.import(jquery_css, jq_css_urls) FILTER null %]
[%# Add
jQuery cookie support
%]
[%# Add
our required jQuery plugins
%]
[% jquery.push("cookie") %]
[% jquery.push("cookie"
, "devbridgeAutocomplete"
) %]
[%# We should be able to set the default value of the header variable
[%# We should be able to set the default value of the header variable
# to the value of the title variable using the DEFAULT directive,
# 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 @@
...
@@ -71,10 +71,14 @@
[% END %]
[% END %]
</select>
</select>
[% ELSE %]
[% ELSE %]
[% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %]
[%
<div id="[% id FILTER html %]_autocomplete"
IF id && feature_enabled('jsonrpc') && Param('ajax_user_autocompletion');
[% IF classes %] class="[% classes.join(' ') FILTER html %]" [% END %]>
IF !classes.defined;
[% END %]
classes = [];
END;
classes.push("bz_autocomplete_user");
END;
%]
<input
<input
name="[% name FILTER html %]"
name="[% name FILTER html %]"
value="[% value FILTER html %]"
value="[% value FILTER html %]"
...
@@ -86,17 +90,6 @@
...
@@ -86,17 +90,6 @@
[% IF size %] size="[% size FILTER html %]" [% END %]
[% IF size %] size="[% size FILTER html %]" [% END %]
[% IF id %] id="[% id FILTER html %]" [% END %]
[% IF id %] id="[% id FILTER html %]" [% END %]
[% IF mandatory %] required [% 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 %]
[% END %]
template/en/default/list/list.html.tmpl
View file @
33a4bd46
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
title = title
title = title
generate_api_token = dotweak
generate_api_token = dotweak
atomlink = "buglist.cgi?$urlquerypart&title=$title&ctype=atom"
atomlink = "buglist.cgi?$urlquerypart&title=$title&ctype=atom"
yui = [ '
autocomplete', '
calendar' ]
yui = [ 'calendar' ]
javascript_urls = [ "js/util.js", "js/field.js", "js/TUI.js" ]
javascript_urls = [ "js/util.js", "js/field.js", "js/TUI.js" ]
style_urls = [ "skins/standard/buglist.css" ]
style_urls = [ "skins/standard/buglist.css" ]
doc_section = "using/finding.html"
doc_section = "using/finding.html"
...
...
template/en/default/request/queue.html.tmpl
View file @
33a4bd46
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
onload="var f = document.request_form; selectProduct(f.product, f.component, null, null, 'Any');"
onload="var f = document.request_form; selectProduct(f.product, f.component, null, null, 'Any');"
javascript_urls=["js/productform.js", "js/field.js"]
javascript_urls=["js/productform.js", "js/field.js"]
style_urls = ['skins/standard/buglist.css']
style_urls = ['skins/standard/buglist.css']
yui = ['autocomplete']
%]
%]
<script type="text/javascript">
<script type="text/javascript">
...
...
template/en/default/search/field.html.tmpl
View file @
33a4bd46
...
@@ -35,22 +35,19 @@
...
@@ -35,22 +35,19 @@
types = types,
types = types,
selected = type_selected
selected = type_selected
%]
%]
<div id="[% field.name FILTER html %]_container">
<input name="[% field.name FILTER html %]"
<input name="[% field.name FILTER html %]"
id="[% field.name FILTER html %]" size="40"
id="[% field.name FILTER html %]" size="40"
class="bz_autocomplete_values"
[% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
[% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
value="[% value FILTER html %]" [% 'autofocus' IF focus %]>
value="[% value FILTER html %]" [% 'autofocus' IF focus %]
<div id="[% field.name FILTER html %]_autocomplete"></div>
data-values="[% field.name FILTER html %]">
</div>
<script type="text/javascript">
<script type="text/javascript">
if (typeof
YAHOO.bugzilla.field_array === "undefined"
)
if (typeof
BUGZILLA.autocomplete_values === 'undefined'
)
YAHOO.bugzilla.field_array
= [];
BUGZILLA.autocomplete_values
= [];
YAHOO.bugzilla.field_array["[% field.name FILTER js %]"
] = [
BUGZILLA.autocomplete_values['[% field.name FILTER js %]'
] = [
[%- FOREACH val = possible_values %]
[%- FOREACH val = possible_values %]
[%-
#
%]"[% val FILTER js %]"
[%- %]"[% val FILTER js %]"
[%- "," IF NOT loop.last %][% END %]];
[%- "," IF NOT loop.last %][% END %]];
YAHOO.bugzilla.fieldAutocomplete.init('[% field.name FILTER js %]',
'[% field.name FILTER js %]_autocomplete');
</script>
</script>
[% CASE [constants.FIELD_TYPE_DATETIME, constants.FIELD_TYPE_DATE] %]
[% CASE [constants.FIELD_TYPE_DATETIME, constants.FIELD_TYPE_DATE] %]
[% INCLUDE "bug/field-label.html.tmpl"
[% 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');
...
@@ -268,19 +268,11 @@ TUI_hide_default('information_query');
[% " selected" IF default.emailtype.$n == qv.name %]>[% qv.description %]</option>
[% " selected" IF default.emailtype.$n == qv.name %]>[% qv.description %]</option>
[% END %]
[% END %]
</select>
</select>
[% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') %]
<input
<div id="email[% n %]_autocomplete">
name="email[% n %]"
[% END %]
class="email [% "bz_autocomplete_user" IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') %]"
<input name="email[% n %]" class="email" id="email[% n %]"
id="email[% n %]"
value="[% default.email.$n FILTER html %]">
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 %]
</div>
</div>
[% END %]
[% END %]
[% Hook.process('email_numbering_end') %]
[% Hook.process('email_numbering_end') %]
...
...
template/en/default/search/search-advanced.html.tmpl
View file @
33a4bd46
...
@@ -26,7 +26,8 @@ function remove_token() {
...
@@ -26,7 +26,8 @@ function remove_token() {
[% PROCESS global/header.html.tmpl
[% PROCESS global/header.html.tmpl
title = "Search for $terms.bugs"
title = "Search for $terms.bugs"
yui = [ 'autocomplete', 'calendar' ]
generate_api_token = 1
yui = [ 'calendar' ]
javascript = javascript
javascript = javascript
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js"]
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js"]
style_urls = ['skins/standard/buglist.css']
style_urls = ['skins/standard/buglist.css']
...
...
template/en/default/search/search-create-series.html.tmpl
View file @
33a4bd46
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
[% PROCESS global/header.html.tmpl
[% PROCESS global/header.html.tmpl
title = "Create New Data Set"
title = "Create New Data Set"
onload = "doOnSelectProduct(0);"
onload = "doOnSelectProduct(0);"
yui = [ '
autocomplete', '
calendar' ]
yui = [ 'calendar' ]
javascript = js_data
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
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"
...
@@ -18,7 +18,7 @@ var queryform = "reportform"
[% PROCESS global/header.html.tmpl
[% PROCESS global/header.html.tmpl
title = "Generate Graphical Report"
title = "Generate Graphical Report"
onload = "doOnSelectProduct(0); chartTypeChanged()"
onload = "doOnSelectProduct(0); chartTypeChanged()"
yui = [ '
autocomplete', '
calendar' ]
yui = [ 'calendar' ]
javascript = js_data
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
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"
...
@@ -18,7 +18,7 @@ var queryform = "reportform"
[% PROCESS global/header.html.tmpl
[% PROCESS global/header.html.tmpl
title = "Generate Tabular Report"
title = "Generate Tabular Report"
onload = "doOnSelectProduct(0)"
onload = "doOnSelectProduct(0)"
yui = [ '
autocomplete', '
calendar' ]
yui = [ 'calendar' ]
javascript = js_data
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
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