summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-05-17 22:19:36 +0200
committerDylan William Hardison <dylan@hardison.net>2017-05-17 23:07:31 +0200
commit3a372a916f3545d37390f692f24f7e1c4d5351b5 (patch)
tree2e0cd93ee1a897e196e86eedfa1233a37cbb2dae /extensions
parent38b13ae3f1885faa0da1d0040a0dda87dc786515 (diff)
downloadbugzilla-3a372a916f3545d37390f692f24f7e1c4d5351b5.tar.gz
bugzilla-3a372a916f3545d37390f692f24f7e1c4d5351b5.tar.xz
Bug 1363803 - Consolidate YUI js and css into one js and one css file
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-creative.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-data-compliance.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-fsa-budget.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-swag.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-user-engagement.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/pages/attachment_bounty_form.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/pages/group_admins.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/pages/triage_reports.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/pages/user_activity.html.tmpl1
-rw-r--r--extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl4
-rw-r--r--extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl6
-rw-r--r--extensions/MyDashboard/web/js/flags.js394
-rw-r--r--extensions/MyDashboard/web/js/query.js462
-rw-r--r--extensions/ProductDashboard/template/en/default/pages/productdashboard.html.tmpl9
-rw-r--r--extensions/ProductDashboard/web/js/components.js136
-rw-r--r--extensions/ProductDashboard/web/js/duplicates.js38
-rw-r--r--extensions/ProductDashboard/web/js/popularity.js38
-rw-r--r--extensions/ProductDashboard/web/js/recents.js44
-rw-r--r--extensions/ProductDashboard/web/js/roadmap.js30
-rw-r--r--extensions/ProductDashboard/web/js/summary.js64
-rw-r--r--extensions/REMO/template/en/default/bug/create/create-remo-budget.html.tmpl1
-rw-r--r--extensions/REMO/template/en/default/bug/create/create-remo-swag.html.tmpl1
-rw-r--r--extensions/REMO/template/en/default/pages/remo-form-payment.html.tmpl1
-rw-r--r--extensions/Splinter/template/en/default/pages/splinter.html.tmpl12
29 files changed, 621 insertions, 633 deletions
diff --git a/extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl
index c19bed29b..413532f3f 100644
--- a/extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl
@@ -87,7 +87,6 @@ function validateAndSubmit() {
javascript = inline_javascript
javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
'js/field.js', 'js/util.js' ]
- yui = [ "calendar", "selector" ]
%]
[% USE Bugzilla %]
diff --git a/extensions/BMO/template/en/default/bug/create/create-creative.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-creative.html.tmpl
index 88e744abe..8825344a3 100644
--- a/extensions/BMO/template/en/default/bug/create/create-creative.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-creative.html.tmpl
@@ -115,7 +115,6 @@ function toggleTypeOther(element) {
javascript = inline_javascript
javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
'js/field.js', 'js/util.js' ]
- yui = [ "calendar" ]
%]
[% USE Bugzilla %]
diff --git a/extensions/BMO/template/en/default/bug/create/create-data-compliance.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-data-compliance.html.tmpl
index f24fd340d..bade9a588 100644
--- a/extensions/BMO/template/en/default/bug/create/create-data-compliance.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-data-compliance.html.tmpl
@@ -69,7 +69,6 @@
javascript_urls = [ 'js/field.js',
'js/util.js',
'extensions/BMO/web/js/form_validate.js' ]
- yui = [ 'calendar', 'selector' ]
%]
<h2>Data Compliance Form</h2>
diff --git a/extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl
index d0d34069b..5742a17e9 100644
--- a/extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl
@@ -46,7 +46,6 @@
'js/util.js',
'extensions/BMO/web/js/form_validate.js',
'extensions/BMO/web/js/dev_engagement.js' ]
- yui = [ 'calendar' ]
%]
<h2>Developer Events Request Form</h2>
diff --git a/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl
index c7f883fb4..0ee909005 100644
--- a/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl
@@ -40,7 +40,6 @@ function validateAndSubmit() {
javascript = inline_javascript
javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
'js/field.js', 'js/util.js', 'js/bug.js' ]
- yui = [ 'datatable', 'button' ]
%]
[% USE Bugzilla %]
diff --git a/extensions/BMO/template/en/default/bug/create/create-fsa-budget.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-fsa-budget.html.tmpl
index c35d66942..502f92c32 100644
--- a/extensions/BMO/template/en/default/bug/create/create-fsa-budget.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-fsa-budget.html.tmpl
@@ -75,7 +75,6 @@ function validateAndSubmit() {
javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
'js/util.js',
'js/field.js' ]
- yui = [ 'calendar' ]
%]
<h1>FSA Budget Request Form</h1>
diff --git a/extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl
index 89c28f114..b17736ce6 100644
--- a/extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-mdn.html.tmpl
@@ -170,7 +170,6 @@ strong.required:before {
title = "Mozilla Developer Network Feedback"
style = inline_style
javascript = inline_javascript
- yui = [ 'history' ]
javascript_urls = [ 'extensions/BMO/web/js/form_validate.js' ]
%]
diff --git a/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl
index c62d8b99f..975006232 100644
--- a/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl
@@ -274,7 +274,6 @@ function validate_form() {
javascript = inline_javascript
javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
'js/field.js', 'js/util.js' ]
- yui = [ "calendar" ]
%]
[% UNLESS user.in_group('pr-private') %]
diff --git a/extensions/BMO/template/en/default/bug/create/create-swag.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-swag.html.tmpl
index 6742c42db..859d77194 100644
--- a/extensions/BMO/template/en/default/bug/create/create-swag.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-swag.html.tmpl
@@ -508,7 +508,6 @@ function showGear() {
javascript = inline_javascript
javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
'js/field.js', 'js/util.js' ]
- yui = [ 'calendar' ]
%]
<h1>Mozilla Gear</h1>
diff --git a/extensions/BMO/template/en/default/bug/create/create-user-engagement.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-user-engagement.html.tmpl
index 23ea0bb86..f15e4f47d 100644
--- a/extensions/BMO/template/en/default/bug/create/create-user-engagement.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-user-engagement.html.tmpl
@@ -81,7 +81,6 @@ function toggleGoalOther() {
javascript = inline_javascript
javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
'js/field.js', 'js/util.js' ]
- yui = [ "calendar" ]
%]
[% USE Bugzilla %]
diff --git a/extensions/BMO/template/en/default/pages/attachment_bounty_form.html.tmpl b/extensions/BMO/template/en/default/pages/attachment_bounty_form.html.tmpl
index 9b6901330..ffbb1acbc 100644
--- a/extensions/BMO/template/en/default/pages/attachment_bounty_form.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/attachment_bounty_form.html.tmpl
@@ -124,7 +124,6 @@ function validateAndSubmit() {
javascript = inline_javascript
javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
'js/field.js', 'js/util.js' ]
- yui = [ "calendar", "selector" ]
%]
[% USE Bugzilla %]
diff --git a/extensions/BMO/template/en/default/pages/group_admins.html.tmpl b/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
index c81c95748..cfa3bd3ea 100644
--- a/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
@@ -21,7 +21,6 @@
[% INCLUDE global/header.html.tmpl
title = "Group Admins Report"
style_urls = [ "extensions/BMO/web/styles/reports.css" ]
- yui = [ "datasource" ]
%]
[% IF groups.size > 0 %]
diff --git a/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl b/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl
index 7958f27d2..05efefca5 100644
--- a/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl
@@ -41,7 +41,6 @@ var selected_components = [
[% INCLUDE global/header.html.tmpl
title = "Unconfirmed Reports"
generate_api_token = 1
- yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/field.js", "js/productform.js",
"extensions/BMO/web/js/triage_reports.js" ]
diff --git a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
index ad79b3c4d..d850c91b2 100644
--- a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
@@ -15,7 +15,6 @@
[% INCLUDE global/header.html.tmpl
title = "User Activity Report" _ who_title
generate_api_token = 1
- yui = [ 'calendar' ]
javascript_urls = [ "js/util.js", "js/field.js" ]
style_urls = [ "extensions/BMO/web/styles/reports.css" ]
diff --git a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
index ee1ba2931..e4b0b44a8 100644
--- a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
+++ b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
@@ -18,9 +18,7 @@
title = "Enter A Bug"
generate_api_token = 1
javascript_urls = js_urls
- style_urls = [ 'extensions/GuidedBugEntry/web/style/guided.css',
- 'js/yui/assets/skins/sam/container.css' ]
- yui = [ 'history', 'datatable', 'container' ]
+ style_urls = [ 'extensions/GuidedBugEntry/web/style/guided.css' ]
%]
<iframe id="yui-history-iframe" src="extensions/GuidedBugEntry/web/yui-history-iframe.txt"></iframe>
diff --git a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
index eda53ebe4..028d1b9b0 100644
--- a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
+++ b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
@@ -11,10 +11,10 @@
[% PROCESS global/header.html.tmpl
title = "My Dashboard"
generate_api_token = 1
- style_urls = [ "extensions/MyDashboard/web/styles/mydashboard.css",
+ style_urls = [ "skins/yui3.css",
+ "extensions/MyDashboard/web/styles/mydashboard.css",
"extensions/ProdCompSearch/web/styles/prod_comp_search.css" ]
- yui = ["json", "connection"],
- javascript_urls = [ "js/yui3/yui/yui-min.js",
+ javascript_urls = [ "js/yui3.js",
"extensions/MyDashboard/web/js/query.js",
"extensions/MyDashboard/web/js/flags.js",
"extensions/ProdCompSearch/web/js/prod_comp_search.js",
diff --git a/extensions/MyDashboard/web/js/flags.js b/extensions/MyDashboard/web/js/flags.js
index e8c175155..95b256708 100644
--- a/extensions/MyDashboard/web/js/flags.js
+++ b/extensions/MyDashboard/web/js/flags.js
@@ -7,224 +7,226 @@
*/
// Flag tables
-YUI({
- base: 'js/yui3/',
- combine: false
-}).use("node", "datatable", "datatable-sort", "json-stringify", "escape",
- "datatable-datasource", "datasource-io", "datasource-jsonschema", function(Y) {
- // Common
- var counter = 0;
- var dataSource = {
- requestee: null,
- requester: null
- };
- var dataTable = {
- requestee: null,
- requester: null
- };
-
- var updateFlagTable = function(type) {
- if (!type) return;
-
- counter = counter + 1;
-
- var callback = {
- success: function(e) {
- if (e.response) {
- Y.one('#' + type + '_count_refresh').removeClass('bz_default_hidden');
- Y.one("#" + type + "_flags_found").setHTML(
- e.response.results.length + ' flags found');
- dataTable[type].set('data', e.response.results);
+$(function () {
+ YUI({
+ base: 'js/yui3/',
+ combine: false
+ }).use("node", "datatable", "datatable-sort", "json-stringify", "escape",
+ "datatable-datasource", "datasource-io", "datasource-jsonschema", function(Y) {
+ // Common
+ var counter = 0;
+ var dataSource = {
+ requestee: null,
+ requester: null
+ };
+ var dataTable = {
+ requestee: null,
+ requester: null
+ };
+
+ var updateFlagTable = function(type) {
+ if (!type) return;
+
+ counter = counter + 1;
+
+ var callback = {
+ success: function(e) {
+ if (e.response) {
+ Y.one('#' + type + '_count_refresh').removeClass('bz_default_hidden');
+ Y.one("#" + type + "_flags_found").setHTML(
+ e.response.results.length + ' flags found');
+ dataTable[type].set('data', e.response.results);
+ }
+ },
+ failure: function(o) {
+ if (o.error) {
+ alert("Failed to load flag list from Bugzilla:\n\n" + o.error.message);
+ } else {
+ alert("Failed to load flag list from Bugzilla.");
+ }
}
- },
- failure: function(o) {
- if (o.error) {
- alert("Failed to load flag list from Bugzilla:\n\n" + o.error.message);
- } else {
- alert("Failed to load flag list from Bugzilla.");
+ };
+
+ var json_object = {
+ version: "1.1",
+ method: "MyDashboard.run_flag_query",
+ id: counter,
+ params: { type : type,
+ Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '')
}
+ };
+
+ var stringified = Y.JSON.stringify(json_object);
+
+ Y.one('#' + type + '_count_refresh').addClass('bz_default_hidden');
+
+ dataTable[type].set('data', []);
+ dataTable[type].render("#" + type + "_table");
+ dataTable[type].showMessage('loadingMessage');
+
+ dataSource[type].sendRequest({
+ request: stringified,
+ cfg: {
+ method: "POST",
+ headers: { 'Content-Type': 'application/json' }
+ },
+ callback: callback
+ });
+ };
+
+ var loadBugList = function(type) {
+ if (!type) return;
+ var data = dataTable[type].data;
+ var ids = [];
+ for (var i = 0, l = data.size(); i < l; i++) {
+ ids.push(data.item(i).get('bug_id'));
}
+ var url = 'buglist.cgi?bug_id=' + ids.join('%2C');
+ window.open(url, '_blank');
};
- var json_object = {
- version: "1.1",
- method: "MyDashboard.run_flag_query",
- id: counter,
- params: { type : type,
- Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '')
+ var bugLinkFormatter = function(o) {
+ var bug_closed = "";
+ if (o.data.bug_status == 'RESOLVED' || o.data.bug_status == 'VERIFIED') {
+ bug_closed = "bz_closed";
}
+ return '<a href="show_bug.cgi?id=' + encodeURIComponent(o.value) +
+ '" target="_blank" ' + 'title="' + Y.Escape.html(o.data.bug_status) + ' - ' +
+ Y.Escape.html(o.data.bug_summary) + '" class="' + Y.Escape.html(bug_closed) +
+ '">' + o.value + '</a>';
};
- var stringified = Y.JSON.stringify(json_object);
+ var updatedFormatter = function(o) {
+ return '<span title="' + Y.Escape.html(o.value) + '">' +
+ Y.Escape.html(o.data.updated_fancy) + '</span>';
+ };
- Y.one('#' + type + '_count_refresh').addClass('bz_default_hidden');
+ var requesteeFormatter = function(o) {
+ return o.value
+ ? Y.Escape.html(o.value)
+ : '<i>anyone</i>';
+ };
- dataTable[type].set('data', []);
- dataTable[type].render("#" + type + "_table");
- dataTable[type].showMessage('loadingMessage');
+ var flagNameFormatter = function(o) {
+ if (parseInt(o.data.attach_id)
+ && parseInt(o.data.is_patch)
+ && MyDashboard.splinter_base)
+ {
+ return '<a href="' + MyDashboard.splinter_base +
+ (MyDashboard.splinter_base.indexOf('?') == -1 ? '?' : '&') +
+ 'bug=' + encodeURIComponent(o.data.bug_id) +
+ '&attachment=' + encodeURIComponent(o.data.attach_id) +
+ '" target="_blank" title="Review this patch">' +
+ Y.Escape.html(o.value) + '</a>';
+ }
+ else {
+ return Y.Escape.html(o.value);
+ }
+ };
- dataSource[type].sendRequest({
- request: stringified,
- cfg: {
- method: "POST",
- headers: { 'Content-Type': 'application/json' }
- },
- callback: callback
+ // Requestee
+ dataSource.requestee = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
+ dataSource.requestee.on('error', function(e) {
+ try {
+ var response = Y.JSON.parse(e.data.responseText);
+ if (response.error)
+ e.error.message = response.error.message;
+ } catch(ex) {
+ // ignore
+ }
+ });
+ dataTable.requestee = new Y.DataTable({
+ columns: [
+ { key: "requester", label: "Requester", sortable: true },
+ { key: "type", label: "Flag", sortable: true,
+ formatter: flagNameFormatter, allowHTML: true },
+ { key: "bug_id", label: "Bug", sortable: true,
+ formatter: bugLinkFormatter, allowHTML: true },
+ { key: "updated", label: "Updated", sortable: true,
+ formatter: updatedFormatter, allowHTML: true }
+ ],
+ strings: {
+ emptyMessage: 'No flag data found.',
+ }
});
- };
-
- var loadBugList = function(type) {
- if (!type) return;
- var data = dataTable[type].data;
- var ids = [];
- for (var i = 0, l = data.size(); i < l; i++) {
- ids.push(data.item(i).get('bug_id'));
- }
- var url = 'buglist.cgi?bug_id=' + ids.join('%2C');
- window.open(url, '_blank');
- };
-
- var bugLinkFormatter = function(o) {
- var bug_closed = "";
- if (o.data.bug_status == 'RESOLVED' || o.data.bug_status == 'VERIFIED') {
- bug_closed = "bz_closed";
- }
- return '<a href="show_bug.cgi?id=' + encodeURIComponent(o.value) +
- '" target="_blank" ' + 'title="' + Y.Escape.html(o.data.bug_status) + ' - ' +
- Y.Escape.html(o.data.bug_summary) + '" class="' + Y.Escape.html(bug_closed) +
- '">' + o.value + '</a>';
- };
-
- var updatedFormatter = function(o) {
- return '<span title="' + Y.Escape.html(o.value) + '">' +
- Y.Escape.html(o.data.updated_fancy) + '</span>';
- };
-
- var requesteeFormatter = function(o) {
- return o.value
- ? Y.Escape.html(o.value)
- : '<i>anyone</i>';
- };
-
- var flagNameFormatter = function(o) {
- if (parseInt(o.data.attach_id)
- && parseInt(o.data.is_patch)
- && MyDashboard.splinter_base)
- {
- return '<a href="' + MyDashboard.splinter_base +
- (MyDashboard.splinter_base.indexOf('?') == -1 ? '?' : '&') +
- 'bug=' + encodeURIComponent(o.data.bug_id) +
- '&attachment=' + encodeURIComponent(o.data.attach_id) +
- '" target="_blank" title="Review this patch">' +
- Y.Escape.html(o.value) + '</a>';
- }
- else {
- return Y.Escape.html(o.value);
- }
- };
-
- // Requestee
- dataSource.requestee = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
- dataSource.requestee.on('error', function(e) {
- try {
- var response = Y.JSON.parse(e.data.responseText);
- if (response.error)
- e.error.message = response.error.message;
- } catch(ex) {
- // ignore
- }
- });
- dataTable.requestee = new Y.DataTable({
- columns: [
- { key: "requester", label: "Requester", sortable: true },
- { key: "type", label: "Flag", sortable: true,
- formatter: flagNameFormatter, allowHTML: true },
- { key: "bug_id", label: "Bug", sortable: true,
- formatter: bugLinkFormatter, allowHTML: true },
- { key: "updated", label: "Updated", sortable: true,
- formatter: updatedFormatter, allowHTML: true }
- ],
- strings: {
- emptyMessage: 'No flag data found.',
- }
- });
- dataTable.requestee.plug(Y.Plugin.DataTableSort);
+ dataTable.requestee.plug(Y.Plugin.DataTableSort);
- dataTable.requestee.plug(Y.Plugin.DataTableDataSource, {
- datasource: dataSource.requestee
- });
+ dataTable.requestee.plug(Y.Plugin.DataTableDataSource, {
+ datasource: dataSource.requestee
+ });
- dataSource.requestee.plug(Y.Plugin.DataSourceJSONSchema, {
- schema: {
- resultListLocator: "result.result.requestee",
- resultFields: ["requester", "type", "attach_id", "is_patch", "bug_id",
- "bug_status", "bug_summary", "updated", "updated_fancy"]
- }
- });
+ dataSource.requestee.plug(Y.Plugin.DataSourceJSONSchema, {
+ schema: {
+ resultListLocator: "result.result.requestee",
+ resultFields: ["requester", "type", "attach_id", "is_patch", "bug_id",
+ "bug_status", "bug_summary", "updated", "updated_fancy"]
+ }
+ });
- dataTable.requestee.render("#requestee_table");
+ dataTable.requestee.render("#requestee_table");
- Y.one('#requestee_refresh').on('click', function(e) {
- updateFlagTable('requestee');
- });
- Y.one('#requestee_buglist').on('click', function(e) {
- loadBugList('requestee');
- });
+ Y.one('#requestee_refresh').on('click', function(e) {
+ updateFlagTable('requestee');
+ });
+ Y.one('#requestee_buglist').on('click', function(e) {
+ loadBugList('requestee');
+ });
- // Requester
- dataSource.requester = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
- dataSource.requester.on('error', function(e) {
- try {
- var response = Y.JSON.parse(e.data.responseText);
- if (response.error)
- e.error.message = response.error.message;
- } catch(ex) {
- // ignore
- }
- });
- dataTable.requester = new Y.DataTable({
- columns: [
- { key:"requestee", label:"Requestee", sortable:true,
- formatter: requesteeFormatter, allowHTML: true },
- { key:"type", label:"Flag", sortable:true,
- formatter: flagNameFormatter, allowHTML: true },
- { key:"bug_id", label:"Bug", sortable:true,
- formatter: bugLinkFormatter, allowHTML: true },
- { key: "updated", label: "Updated", sortable: true,
- formatter: updatedFormatter, allowHTML: true }
- ],
- strings: {
- emptyMessage: 'No flag data found.',
- }
- });
+ // Requester
+ dataSource.requester = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
+ dataSource.requester.on('error', function(e) {
+ try {
+ var response = Y.JSON.parse(e.data.responseText);
+ if (response.error)
+ e.error.message = response.error.message;
+ } catch(ex) {
+ // ignore
+ }
+ });
+ dataTable.requester = new Y.DataTable({
+ columns: [
+ { key:"requestee", label:"Requestee", sortable:true,
+ formatter: requesteeFormatter, allowHTML: true },
+ { key:"type", label:"Flag", sortable:true,
+ formatter: flagNameFormatter, allowHTML: true },
+ { key:"bug_id", label:"Bug", sortable:true,
+ formatter: bugLinkFormatter, allowHTML: true },
+ { key: "updated", label: "Updated", sortable: true,
+ formatter: updatedFormatter, allowHTML: true }
+ ],
+ strings: {
+ emptyMessage: 'No flag data found.',
+ }
+ });
- dataTable.requester.plug(Y.Plugin.DataTableSort);
+ dataTable.requester.plug(Y.Plugin.DataTableSort);
- dataTable.requester.plug(Y.Plugin.DataTableDataSource, {
- datasource: dataSource.requester
- });
+ dataTable.requester.plug(Y.Plugin.DataTableDataSource, {
+ datasource: dataSource.requester
+ });
- dataSource.requester.plug(Y.Plugin.DataSourceJSONSchema, {
- schema: {
- resultListLocator: "result.result.requester",
- resultFields: ["requestee", "type", "attach_id", "is_patch", "bug_id",
- "bug_status", "bug_summary", "updated", "updated_fancy"]
- }
- });
+ dataSource.requester.plug(Y.Plugin.DataSourceJSONSchema, {
+ schema: {
+ resultListLocator: "result.result.requester",
+ resultFields: ["requestee", "type", "attach_id", "is_patch", "bug_id",
+ "bug_status", "bug_summary", "updated", "updated_fancy"]
+ }
+ });
- // Initial load
- Y.on("contentready", function (e) {
- updateFlagTable("requestee");
- }, "#requestee_table");
- Y.on("contentready", function (e) {
- updateFlagTable("requester");
- }, "#requester_table");
+ // Initial load
+ Y.on("contentready", function (e) {
+ updateFlagTable("requestee");
+ }, "#requestee_table");
+ Y.on("contentready", function (e) {
+ updateFlagTable("requester");
+ }, "#requester_table");
- Y.one('#requester_refresh').on('click', function(e) {
- updateFlagTable('requester');
- });
- Y.one('#requester_buglist').on('click', function(e) {
- loadBugList('requester');
+ Y.one('#requester_refresh').on('click', function(e) {
+ updateFlagTable('requester');
+ });
+ Y.one('#requester_buglist').on('click', function(e) {
+ loadBugList('requester');
+ });
});
});
diff --git a/extensions/MyDashboard/web/js/query.js b/extensions/MyDashboard/web/js/query.js
index 9cea27f87..a95c0be61 100644
--- a/extensions/MyDashboard/web/js/query.js
+++ b/extensions/MyDashboard/web/js/query.js
@@ -11,274 +11,276 @@ if (typeof(MyDashboard) == 'undefined') {
}
// Main query code
-YUI({
- base: 'js/yui3/',
- combine: false,
- groups: {
- gallery: {
- combine: false,
- base: 'js/yui3/',
- patterns: { 'gallery-': {} }
- }
- }
-}).use("node", "datatable", "datatable-sort", "datatable-message", "json-stringify",
- "datatable-datasource", "datasource-io", "datasource-jsonschema", "cookie",
- "gallery-datatable-row-expansion-bmo", "handlebars", "escape", function(Y) {
- var counter = 0,
- bugQueryTable = null,
- bugQuery = null,
- lastChangesQuery = null,
- lastChangesCache = {},
- default_query = "assignedbugs";
-
- // Grab last used query name from cookie or use default
- var query_cookie = Y.Cookie.get("my_dashboard_query");
- if (query_cookie) {
- var cookie_value_found = 0;
- Y.one("#query").get("options").each( function() {
- if (this.get("value") == query_cookie) {
- this.set('selected', true);
- default_query = query_cookie;
- cookie_value_found = 1;
+$(function() {
+ YUI({
+ base: 'js/yui3/',
+ combine: false,
+ groups: {
+ gallery: {
+ combine: false,
+ base: 'js/yui3/',
+ patterns: { 'gallery-': {} }
}
- });
- if (!cookie_value_found) {
- Y.Cookie.set("my_dashboard_query", "");
}
- }
-
- var bugQuery = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
-
- bugQuery.plug(Y.Plugin.DataSourceJSONSchema, {
- schema: {
- resultListLocator: "result.result.bugs",
- resultFields: ["bug_id", "changeddate", "changeddate_fancy",
- "bug_status", "short_desc", "changeddate_api" ],
- metaFields: {
- description: "result.result.description",
- heading: "result.result.heading",
- buffer: "result.result.buffer",
- mark_read: "result.result.mark_read"
+ }).use("node", "datatable", "datatable-sort", "datatable-message", "json-stringify",
+ "datatable-datasource", "datasource-io", "datasource-jsonschema", "cookie",
+ "gallery-datatable-row-expansion-bmo", "handlebars", "escape", function(Y) {
+ var counter = 0,
+ bugQueryTable = null,
+ bugQuery = null,
+ lastChangesQuery = null,
+ lastChangesCache = {},
+ default_query = "assignedbugs";
+
+ // Grab last used query name from cookie or use default
+ var query_cookie = Y.Cookie.get("my_dashboard_query");
+ if (query_cookie) {
+ var cookie_value_found = 0;
+ Y.one("#query").get("options").each( function() {
+ if (this.get("value") == query_cookie) {
+ this.set('selected', true);
+ default_query = query_cookie;
+ cookie_value_found = 1;
+ }
+ });
+ if (!cookie_value_found) {
+ Y.Cookie.set("my_dashboard_query", "");
}
}
- });
- bugQuery.on('error', function(e) {
- try {
- var response = Y.JSON.parse(e.data.responseText);
- if (response.error)
- e.error.message = response.error.message;
- } catch(ex) {
- // ignore
- }
- });
-
- var bugQueryCallback = {
- success: function(e) {
- if (e.response) {
- Y.one('#query_count_refresh').removeClass('bz_default_hidden');
- Y.one("#query_container .query_description").setHTML(e.response.meta.description);
- Y.one("#query_container .query_heading").setHTML(e.response.meta.heading);
- Y.one("#query_bugs_found").setHTML(
- '<a href="buglist.cgi?' + e.response.meta.buffer +
- '" target="_blank">' + e.response.results.length + ' bugs found</a>');
- bugQueryTable.set('data', e.response.results);
-
- var mark_read = e.response.meta.mark_read;
- if (mark_read) {
- Y.one('#query_markread').setHTML( mark_read );
- Y.one('#bar_markread').removeClass('bz_default_hidden');
- Y.one('#query_markread_text').setHTML( mark_read );
- Y.one('#query_markread').removeClass('bz_default_hidden');
- }
- else {
- Y.one('#bar_markread').addClass('bz_default_hidden');
- Y.one('#query_markread').addClass('bz_default_hidden');
+ var bugQuery = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
+
+ bugQuery.plug(Y.Plugin.DataSourceJSONSchema, {
+ schema: {
+ resultListLocator: "result.result.bugs",
+ resultFields: ["bug_id", "changeddate", "changeddate_fancy",
+ "bug_status", "short_desc", "changeddate_api" ],
+ metaFields: {
+ description: "result.result.description",
+ heading: "result.result.heading",
+ buffer: "result.result.buffer",
+ mark_read: "result.result.mark_read"
}
- Y.one('#query_markread_text').addClass('bz_default_hidden');
}
- },
- failure: function(o) {
- if (o.error) {
- alert("Failed to load bug list from Bugzilla:\n\n" + o.error.message);
- } else {
- alert("Failed to load bug list from Bugzilla.");
+ });
+
+ bugQuery.on('error', function(e) {
+ try {
+ var response = Y.JSON.parse(e.data.responseText);
+ if (response.error)
+ e.error.message = response.error.message;
+ } catch(ex) {
+ // ignore
}
- }
- };
+ });
- var updateQueryTable = function(query_name) {
- if (!query_name) return;
+ var bugQueryCallback = {
+ success: function(e) {
+ if (e.response) {
+ Y.one('#query_count_refresh').removeClass('bz_default_hidden');
+ Y.one("#query_container .query_description").setHTML(e.response.meta.description);
+ Y.one("#query_container .query_heading").setHTML(e.response.meta.heading);
+ Y.one("#query_bugs_found").setHTML(
+ '<a href="buglist.cgi?' + e.response.meta.buffer +
+ '" target="_blank">' + e.response.results.length + ' bugs found</a>');
+ bugQueryTable.set('data', e.response.results);
+
+ var mark_read = e.response.meta.mark_read;
+ if (mark_read) {
+ Y.one('#query_markread').setHTML( mark_read );
+ Y.one('#bar_markread').removeClass('bz_default_hidden');
+ Y.one('#query_markread_text').setHTML( mark_read );
+ Y.one('#query_markread').removeClass('bz_default_hidden');
+ }
+ else {
+ Y.one('#bar_markread').addClass('bz_default_hidden');
+ Y.one('#query_markread').addClass('bz_default_hidden');
+ }
+ Y.one('#query_markread_text').addClass('bz_default_hidden');
+ }
+ },
+ failure: function(o) {
+ if (o.error) {
+ alert("Failed to load bug list from Bugzilla:\n\n" + o.error.message);
+ } else {
+ alert("Failed to load bug list from Bugzilla.");
+ }
+ }
+ };
- counter = counter + 1;
- lastChangesCache = {};
+ var updateQueryTable = function(query_name) {
+ if (!query_name) return;
- Y.one('#query_count_refresh').addClass('bz_default_hidden');
- bugQueryTable.set('data', []);
- bugQueryTable.render("#query_table");
- bugQueryTable.showMessage('loadingMessage');
+ counter = counter + 1;
+ lastChangesCache = {};
- var bugQueryParams = {
- version: "1.1",
- method: "MyDashboard.run_bug_query",
- id: counter,
- params: { query : query_name,
- Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '')
- }
- };
+ Y.one('#query_count_refresh').addClass('bz_default_hidden');
+ bugQueryTable.set('data', []);
+ bugQueryTable.render("#query_table");
+ bugQueryTable.showMessage('loadingMessage');
- bugQuery.sendRequest({
- request: Y.JSON.stringify(bugQueryParams),
- cfg: {
- method: "POST",
- headers: { 'Content-Type': 'application/json' }
- },
- callback: bugQueryCallback
- });
- };
+ var bugQueryParams = {
+ version: "1.1",
+ method: "MyDashboard.run_bug_query",
+ id: counter,
+ params: { query : query_name,
+ Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '')
+ }
+ };
- var updatedFormatter = function(o) {
- return '<span title="' + Y.Escape.html(o.value) + '">' +
- Y.Escape.html(o.data.changeddate_fancy) + '</span>';
- };
+ bugQuery.sendRequest({
+ request: Y.JSON.stringify(bugQueryParams),
+ cfg: {
+ method: "POST",
+ headers: { 'Content-Type': 'application/json' }
+ },
+ callback: bugQueryCallback
+ });
+ };
+ var updatedFormatter = function(o) {
+ return '<span title="' + Y.Escape.html(o.value) + '">' +
+ Y.Escape.html(o.data.changeddate_fancy) + '</span>';
+ };
- lastChangesQuery = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
- lastChangesQuery.plug(Y.Plugin.DataSourceJSONSchema, {
- schema: {
- resultListLocator: "result.results",
- resultFields: ["last_changes"],
- }
- });
+ lastChangesQuery = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
- lastChangesQuery.on('error', function(e) {
- try {
- var response = Y.JSON.parse(e.data.responseText);
- if (response.error)
- e.error.message = response.error.message;
- } catch(ex) {
- // ignore
- }
- });
+ lastChangesQuery.plug(Y.Plugin.DataSourceJSONSchema, {
+ schema: {
+ resultListLocator: "result.results",
+ resultFields: ["last_changes"],
+ }
+ });
- bugQueryTable = new Y.DataTable({
- columns: [
- { key: Y.Plugin.DataTableRowExpansion.column_key, label: ' ', sortable: false },
- { key: "bug_id", label: "Bug", allowHTML: true, sortable: true,
- formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
- { key: "changeddate", label: "Updated", formatter: updatedFormatter,
- allowHTML: true, sortable: true },
- { key: "bug_status", label: "Status", sortable: true },
- { key: "short_desc", label: "Summary", sortable: true },
- ],
- });
+ lastChangesQuery.on('error', function(e) {
+ try {
+ var response = Y.JSON.parse(e.data.responseText);
+ if (response.error)
+ e.error.message = response.error.message;
+ } catch(ex) {
+ // ignore
+ }
+ });
- var last_changes_source = Y.one('#last-changes-template').getHTML(),
- last_changes_template = Y.Handlebars.compile(last_changes_source);
+ bugQueryTable = new Y.DataTable({
+ columns: [
+ { key: Y.Plugin.DataTableRowExpansion.column_key, label: ' ', sortable: false },
+ { key: "bug_id", label: "Bug", allowHTML: true, sortable: true,
+ formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
+ { key: "changeddate", label: "Updated", formatter: updatedFormatter,
+ allowHTML: true, sortable: true },
+ { key: "bug_status", label: "Status", sortable: true },
+ { key: "short_desc", label: "Summary", sortable: true },
+ ],
+ });
- var stub_source = Y.one('#last-changes-stub').getHTML(),
- stub_template = Y.Handlebars.compile(stub_source);
+ var last_changes_source = Y.one('#last-changes-template').getHTML(),
+ last_changes_template = Y.Handlebars.compile(last_changes_source);
+ var stub_source = Y.one('#last-changes-stub').getHTML(),
+ stub_template = Y.Handlebars.compile(stub_source);
- bugQueryTable.plug(Y.Plugin.DataTableRowExpansion, {
- uniqueIdKey: 'bug_id',
- template: function(data) {
- var bug_id = data.bug_id;
- var lastChangesCallback = {
- success: function(e) {
- if (e.response) {
- var last_changes = e.response.results[0].last_changes;
- last_changes['bug_id'] = bug_id;
- lastChangesCache[bug_id] = last_changes;
- Y.one('#last_changes_stub_' + bug_id).setHTML(last_changes_template(last_changes));
- }
- },
- failure: function(o) {
- if (o.error) {
- alert("Failed to load last changes from Bugzilla:\n\n" + o.error.message);
- } else {
- alert("Failed to load last changes from Bugzilla.");
- }
- }
- };
+ bugQueryTable.plug(Y.Plugin.DataTableRowExpansion, {
+ uniqueIdKey: 'bug_id',
+ template: function(data) {
+ var bug_id = data.bug_id;
- if (!lastChangesCache[bug_id]) {
- var lastChangesParams = {
- version: "1.1",
- method: "MyDashboard.run_last_changes",
- params: {
- bug_id: data.bug_id,
- changeddate_api: data.changeddate_api,
- Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '')
+ var lastChangesCallback = {
+ success: function(e) {
+ if (e.response) {
+ var last_changes = e.response.results[0].last_changes;
+ last_changes['bug_id'] = bug_id;
+ lastChangesCache[bug_id] = last_changes;
+ Y.one('#last_changes_stub_' + bug_id).setHTML(last_changes_template(last_changes));
+ }
+ },
+ failure: function(o) {
+ if (o.error) {
+ alert("Failed to load last changes from Bugzilla:\n\n" + o.error.message);
+ } else {
+ alert("Failed to load last changes from Bugzilla.");
+ }
}
};
- lastChangesQuery.sendRequest({
- request: Y.JSON.stringify(lastChangesParams),
- cfg: {
- method: "POST",
- headers: { 'Content-Type': 'application/json' }
- },
- callback: lastChangesCallback
- });
+ if (!lastChangesCache[bug_id]) {
+ var lastChangesParams = {
+ version: "1.1",
+ method: "MyDashboard.run_last_changes",
+ params: {
+ bug_id: data.bug_id,
+ changeddate_api: data.changeddate_api,
+ Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '')
+ }
+ };
+
+ lastChangesQuery.sendRequest({
+ request: Y.JSON.stringify(lastChangesParams),
+ cfg: {
+ method: "POST",
+ headers: { 'Content-Type': 'application/json' }
+ },
+ callback: lastChangesCallback
+ });
+
+ return stub_template({bug_id: bug_id});
+ }
+ else {
+ return last_changes_template(lastChangesCache[bug_id]);
+ }
- return stub_template({bug_id: bug_id});
- }
- else {
- return last_changes_template(lastChangesCache[bug_id]);
}
+ });
- }
- });
-
- bugQueryTable.plug(Y.Plugin.DataTableSort);
+ bugQueryTable.plug(Y.Plugin.DataTableSort);
- bugQueryTable.plug(Y.Plugin.DataTableDataSource, {
- datasource: bugQuery
- });
+ bugQueryTable.plug(Y.Plugin.DataTableDataSource, {
+ datasource: bugQuery
+ });
- // Initial load
- Y.on("contentready", function (e) {
- updateQueryTable(default_query);
- }, "#query_table");
+ // Initial load
+ Y.on("contentready", function (e) {
+ updateQueryTable(default_query);
+ }, "#query_table");
- Y.one('#query').on('change', function(e) {
- var index = e.target.get('selectedIndex');
- var selected_value = e.target.get("options").item(index).getAttribute('value');
- updateQueryTable(selected_value);
- Y.Cookie.set("my_dashboard_query", selected_value, { expires: new Date("January 12, 2025") });
- });
+ Y.one('#query').on('change', function(e) {
+ var index = e.target.get('selectedIndex');
+ var selected_value = e.target.get("options").item(index).getAttribute('value');
+ updateQueryTable(selected_value);
+ Y.Cookie.set("my_dashboard_query", selected_value, { expires: new Date("January 12, 2025") });
+ });
- Y.one('#query_refresh').on('click', function(e) {
- var query_select = Y.one('#query');
- var index = query_select.get('selectedIndex');
- var selected_value = query_select.get("options").item(index).getAttribute('value');
- updateQueryTable(selected_value);
- });
+ Y.one('#query_refresh').on('click', function(e) {
+ var query_select = Y.one('#query');
+ var index = query_select.get('selectedIndex');
+ var selected_value = query_select.get("options").item(index).getAttribute('value');
+ updateQueryTable(selected_value);
+ });
- Y.one('#query_markread').on('click', function(e) {
- var data = bugQueryTable.data;
- var bug_ids = [];
+ Y.one('#query_markread').on('click', function(e) {
+ var data = bugQueryTable.data;
+ var bug_ids = [];
- Y.one('#query_markread').addClass('bz_default_hidden');
- Y.one('#query_markread_text').removeClass('bz_default_hidden');
+ Y.one('#query_markread').addClass('bz_default_hidden');
+ Y.one('#query_markread_text').removeClass('bz_default_hidden');
- for (var i = 0, l = data.size(); i < l; i++) {
- bug_ids.push(data.item(i).get('bug_id'));
- }
- YAHOO.bugzilla.bugUserLastVisit.update(bug_ids);
- YAHOO.bugzilla.bugInterest.unmark(bug_ids);
- });
+ for (var i = 0, l = data.size(); i < l; i++) {
+ bug_ids.push(data.item(i).get('bug_id'));
+ }
+ YAHOO.bugzilla.bugUserLastVisit.update(bug_ids);
+ YAHOO.bugzilla.bugInterest.unmark(bug_ids);
+ });
- Y.one('#query_buglist').on('click', function(e) {
- var data = bugQueryTable.data;
- var ids = [];
- for (var i = 0, l = data.size(); i < l; i++) {
- ids.push(data.item(i).get('bug_id'));
- }
- var url = 'buglist.cgi?bug_id=' + ids.join('%2C');
- window.open(url, '_blank');
+ Y.one('#query_buglist').on('click', function(e) {
+ var data = bugQueryTable.data;
+ var ids = [];
+ for (var i = 0, l = data.size(); i < l; i++) {
+ ids.push(data.item(i).get('bug_id'));
+ }
+ var url = 'buglist.cgi?bug_id=' + ids.join('%2C');
+ window.open(url, '_blank');
+ });
});
});
diff --git a/extensions/ProductDashboard/template/en/default/pages/productdashboard.html.tmpl b/extensions/ProductDashboard/template/en/default/pages/productdashboard.html.tmpl
index 3a01f879f..413239b6c 100644
--- a/extensions/ProductDashboard/template/en/default/pages/productdashboard.html.tmpl
+++ b/extensions/ProductDashboard/template/en/default/pages/productdashboard.html.tmpl
@@ -8,15 +8,14 @@
[% PROCESS global/variables.none.tmpl %]
-[% javascript_urls = [ "js/yui3/yui/yui-min.js",
+[% javascript_urls = [ "js/yui3.js",
"js/util.js",
"js/field.js" ]
%]
[% IF current_tab_name == 'summary' %]
[% javascript_urls.push("extensions/ProductDashboard/web/js/summary.js") %]
- [% ELSIF current_tab_name == 'recents' %]
- [% yui = [ "calendar" ] %]
+[% ELSIF current_tab_name == 'recents' %]
[% javascript_urls.push("js/field.js") %]
[% javascript_urls.push("js/util.js") %]
[% javascript_urls.push("extensions/ProductDashboard/web/js/recents.js") %]
@@ -46,8 +45,8 @@
title = "Product Dashboard: $filtered_product"
generate_api_token = 1
javascript = js
- style_urls = [ "skins/standard/buglist.css",
- "js/yui/assets/skins/sam/paginator.css",
+ style_urls = [ "skins/yui3.css",
+ "skins/standard/buglist.css",
"extensions/ProductDashboard/web/styles/productdashboard.css" ]
%]
diff --git a/extensions/ProductDashboard/web/js/components.js b/extensions/ProductDashboard/web/js/components.js
index 8b0d28587..0c48576a7 100644
--- a/extensions/ProductDashboard/web/js/components.js
+++ b/extensions/ProductDashboard/web/js/components.js
@@ -6,85 +6,87 @@
* defined by the Mozilla Public License, v. 2.0.
*/
-YUI({
- base: 'js/yui3/',
- combine: false
-}).use("datatable", "datatable-sort", "escape", function(Y) {
- if (typeof PD.updated_recently != 'undefined') {
- var columns = [
- { key:"id", label:"ID", sortable:true, allowHTML: true,
- formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
- { key:"bug_status", label:"Status", sortable:true },
- { key:"version", label:"Version", sortable:true },
- { key:"component", label:"Component", sortable:true },
- { key:"severity", label:"Severity", sortable:true },
- { key:"summary", label:"Summary", sortable:false },
- ];
+$(function() {
+ YUI({
+ base: 'js/yui3/',
+ combine: false
+ }).use("datatable", "datatable-sort", "escape", function(Y) {
+ if (typeof PD.updated_recently != 'undefined') {
+ var columns = [
+ { key:"id", label:"ID", sortable:true, allowHTML: true,
+ formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
+ { key:"bug_status", label:"Status", sortable:true },
+ { key:"version", label:"Version", sortable:true },
+ { key:"component", label:"Component", sortable:true },
+ { key:"severity", label:"Severity", sortable:true },
+ { key:"summary", label:"Summary", sortable:false },
+ ];
- var updatedRecentlyDataTable = new Y.DataTable({
- columns: columns,
- data: PD.updated_recently
- });
- updatedRecentlyDataTable.render("#updated_recently");
-
- if (typeof PD.past_due != 'undefined') {
- var pastDueDataTable = new Y.DataTable({
+ var updatedRecentlyDataTable = new Y.DataTable({
columns: columns,
- data: PD.past_due
+ data: PD.updated_recently
});
- pastDueDataTable.render('#past_due');
- }
- }
+ updatedRecentlyDataTable.render("#updated_recently");
- if (typeof PD.component_counts != 'undefined') {
- var summary_url = '<a href="page.cgi?id=productdashboard.html&amp;product=' +
- encodeURIComponent(PD.product_name) + '&bug_status=' +
- encodeURIComponent(PD.bug_status) + '&tab=components';
-
- var columns = [
- { key:"name", label:"Name", sortable:true, allowHTML: true,
- formatter: function (o) {
- return summary_url + '&component=' +
- encodeURIComponent(o.value) + '">' +
- Y.Escape.html(o.value) + '</a>'
- }
- },
- { key:"count", label:"Count", sortable:true },
- { key:"percentage", label:"Percentage", sortable:false, allowHTML: true,
- formatter: '<div class="percentage"><div class="bar" style="width:{value}%"></div><div class="percent">{value}%</div></div>' },
- { key:"link", label:"Link", sortable:false, allowHTML: true }
- ];
+ if (typeof PD.past_due != 'undefined') {
+ var pastDueDataTable = new Y.DataTable({
+ columns: columns,
+ data: PD.past_due
+ });
+ pastDueDataTable.render('#past_due');
+ }
+ }
- var componentsDataTable = new Y.DataTable({
- columns: columns,
- data: PD.component_counts
- });
- componentsDataTable.render("#component_counts");
+ if (typeof PD.component_counts != 'undefined') {
+ var summary_url = '<a href="page.cgi?id=productdashboard.html&amp;product=' +
+ encodeURIComponent(PD.product_name) + '&bug_status=' +
+ encodeURIComponent(PD.bug_status) + '&tab=components';
- columns[0].formatter = function (o) {
- return summary_url + '&version=' +
- encodeURIComponent(o.value) + '">' +
- Y.Escape.html(o.value) + '</a>';
- };
+ var columns = [
+ { key:"name", label:"Name", sortable:true, allowHTML: true,
+ formatter: function (o) {
+ return summary_url + '&component=' +
+ encodeURIComponent(o.value) + '">' +
+ Y.Escape.html(o.value) + '</a>'
+ }
+ },
+ { key:"count", label:"Count", sortable:true },
+ { key:"percentage", label:"Percentage", sortable:false, allowHTML: true,
+ formatter: '<div class="percentage"><div class="bar" style="width:{value}%"></div><div class="percent">{value}%</div></div>' },
+ { key:"link", label:"Link", sortable:false, allowHTML: true }
+ ];
- var versionsDataTable = new Y.DataTable({
- columns: columns,
- data: PD.version_counts
- });
- versionsDataTable.render('#version_counts');
+ var componentsDataTable = new Y.DataTable({
+ columns: columns,
+ data: PD.component_counts
+ });
+ componentsDataTable.render("#component_counts");
- if (typeof PD.milestone_counts != 'undefined') {
columns[0].formatter = function (o) {
- return summary_url + '&target_milestone=' +
- encodeURIComponent(o.value) + '">' +
- Y.Escape.html(o.value) + '</a>';
+ return summary_url + '&version=' +
+ encodeURIComponent(o.value) + '">' +
+ Y.Escape.html(o.value) + '</a>';
};
- var milestonesDataTable = new Y.DataTable({
+ var versionsDataTable = new Y.DataTable({
columns: columns,
- data: PD.milestone_counts
+ data: PD.version_counts
});
- milestonesDataTable.render('#milestone_counts');
+ versionsDataTable.render('#version_counts');
+
+ if (typeof PD.milestone_counts != 'undefined') {
+ columns[0].formatter = function (o) {
+ return summary_url + '&target_milestone=' +
+ encodeURIComponent(o.value) + '">' +
+ Y.Escape.html(o.value) + '</a>';
+ };
+
+ var milestonesDataTable = new Y.DataTable({
+ columns: columns,
+ data: PD.milestone_counts
+ });
+ milestonesDataTable.render('#milestone_counts');
+ }
}
- }
+ });
});
diff --git a/extensions/ProductDashboard/web/js/duplicates.js b/extensions/ProductDashboard/web/js/duplicates.js
index 5e3193a65..57f890d6e 100644
--- a/extensions/ProductDashboard/web/js/duplicates.js
+++ b/extensions/ProductDashboard/web/js/duplicates.js
@@ -6,23 +6,25 @@
* defined by the Mozilla Public License, v. 2.0.
*/
-YUI({
- base: 'js/yui3/',
- combine: false
-}).use("datatable", "datatable-sort", function (Y) {
- var column_defs = [
- { key:"id", label:"ID", sortable:true, allowHTML: true,
- formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
- { key:"count", label:"Count", sortable:true },
- { key:"status", label:"Status", sortable:true },
- { key:"version", label:"Version", sortable:true },
- { key:"component", label:"Component", sortable:true },
- { key:"severity", label:"Severity", sortable:true },
- { key:"summary", label:"Summary", sortable:false },
- ];
+$(function() {
+ YUI({
+ base: 'js/yui3/',
+ combine: false
+ }).use("datatable", "datatable-sort", function (Y) {
+ var column_defs = [
+ { key:"id", label:"ID", sortable:true, allowHTML: true,
+ formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
+ { key:"count", label:"Count", sortable:true },
+ { key:"status", label:"Status", sortable:true },
+ { key:"version", label:"Version", sortable:true },
+ { key:"component", label:"Component", sortable:true },
+ { key:"severity", label:"Severity", sortable:true },
+ { key:"summary", label:"Summary", sortable:false },
+ ];
- var duplicatesDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.duplicates
- }).render('#duplicates');
+ var duplicatesDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.duplicates
+ }).render('#duplicates');
+ });
});
diff --git a/extensions/ProductDashboard/web/js/popularity.js b/extensions/ProductDashboard/web/js/popularity.js
index b78b67867..d496481fa 100644
--- a/extensions/ProductDashboard/web/js/popularity.js
+++ b/extensions/ProductDashboard/web/js/popularity.js
@@ -6,23 +6,25 @@
* defined by the Mozilla Public License, v. 2.0.
*/
-YUI({
- base: 'js/yui3/',
- combine: false
-}).use("datatable", "datatable-sort", function (Y) {
- var column_defs = [
- { key:"id", label:"ID", sortable:true, allowHTML: true,
- formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
- { key:"count", label:"Count", sortable:true },
- { key:"status", label:"Status", sortable:true },
- { key:"version", label:"Version", sortable:true },
- { key:"component", label:"Component", sortable:true },
- { key:"severity", label:"Severity", sortable:true },
- { key:"summary", label:"Summary", sortable:false },
- ];
+$(function() {
+ YUI({
+ base: 'js/yui3/',
+ combine: false
+ }).use("datatable", "datatable-sort", function (Y) {
+ var column_defs = [
+ { key:"id", label:"ID", sortable:true, allowHTML: true,
+ formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
+ { key:"count", label:"Count", sortable:true },
+ { key:"status", label:"Status", sortable:true },
+ { key:"version", label:"Version", sortable:true },
+ { key:"component", label:"Component", sortable:true },
+ { key:"severity", label:"Severity", sortable:true },
+ { key:"summary", label:"Summary", sortable:false },
+ ];
- var popularityDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.popularity
- }).render('#popularity');
+ var popularityDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.popularity
+ }).render('#popularity');
+ });
});
diff --git a/extensions/ProductDashboard/web/js/recents.js b/extensions/ProductDashboard/web/js/recents.js
index 84e1758b6..d3a596c64 100644
--- a/extensions/ProductDashboard/web/js/recents.js
+++ b/extensions/ProductDashboard/web/js/recents.js
@@ -6,27 +6,29 @@
* defined by the Mozilla Public License, v. 2.0.
*/
-YUI({
- base: 'js/yui3/',
- combine: false
-}).use("datatable", "datatable-sort", function (Y) {
- var column_defs = [
- { key:"id", label:"ID", sortable:true, allowHTML: true,
- formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
- { key:"status", label:"Status", sortable:true },
- { key:"version", label:"Version", sortable:true },
- { key:"component", label:"Component", sortable:true },
- { key:"severity", label:"Severity", sortable:true },
- { key:"summary", label:"Summary", sortable:false },
- ];
+$(function () {
+ YUI({
+ base: 'js/yui3/',
+ combine: false
+ }).use("datatable", "datatable-sort", function (Y) {
+ var column_defs = [
+ { key:"id", label:"ID", sortable:true, allowHTML: true,
+ formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>' },
+ { key:"status", label:"Status", sortable:true },
+ { key:"version", label:"Version", sortable:true },
+ { key:"component", label:"Component", sortable:true },
+ { key:"severity", label:"Severity", sortable:true },
+ { key:"summary", label:"Summary", sortable:false },
+ ];
- var recentlyOpenedDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.recents.opened
- }).render('#recently_opened');
+ var recentlyOpenedDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.recents.opened
+ }).render('#recently_opened');
- var recentlyClosedDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.recents.closed
- }).render('#recently_closed');
+ var recentlyClosedDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.recents.closed
+ }).render('#recently_closed');
+ });
});
diff --git a/extensions/ProductDashboard/web/js/roadmap.js b/extensions/ProductDashboard/web/js/roadmap.js
index 1bef5b091..466446c13 100644
--- a/extensions/ProductDashboard/web/js/roadmap.js
+++ b/extensions/ProductDashboard/web/js/roadmap.js
@@ -6,19 +6,21 @@
* defined by the Mozilla Public License, v. 2.0.
*/
-YUI({
- base: 'js/yui3/',
- combine: false
-}).use("datatable", "datatable-sort", function (Y) {
- var column_defs = [
- { key: 'name', label: 'Name', sortable: true },
- { key: 'percentage', label: 'Percentage', sortable: false, allowHTML: true,
- formatter: '<div class="percentage"><div class="bar" style="width:{value}%"></div><div class="percent">{value}%</div></div>' },
- { key: 'link', label: 'Links', allowHTML: true, sortable: false }
- ];
+$(function() {
+ YUI({
+ base: 'js/yui3/',
+ combine: false
+ }).use("datatable", "datatable-sort", function (Y) {
+ var column_defs = [
+ { key: 'name', label: 'Name', sortable: true },
+ { key: 'percentage', label: 'Percentage', sortable: false, allowHTML: true,
+ formatter: '<div class="percentage"><div class="bar" style="width:{value}%"></div><div class="percent">{value}%</div></div>' },
+ { key: 'link', label: 'Links', allowHTML: true, sortable: false }
+ ];
- var roadmapDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.roadmap,
- }).render('#bug_milestones');
+ var roadmapDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.roadmap,
+ }).render('#bug_milestones');
+ });
});
diff --git a/extensions/ProductDashboard/web/js/summary.js b/extensions/ProductDashboard/web/js/summary.js
index 59d000d7b..c4501200a 100644
--- a/extensions/ProductDashboard/web/js/summary.js
+++ b/extensions/ProductDashboard/web/js/summary.js
@@ -6,40 +6,42 @@
* defined by the Mozilla Public License, v. 2.0.
*/
-YUI({
- base: 'js/yui3/',
- combine: false
-}).use("datatable", "datatable-sort", function (Y) {
- var column_defs = [
- { key: 'name', label: 'Name', sortable: true },
- { key: 'count', label: 'Count', sortable: true },
- { key: 'percentage', label: 'Percentage', sortable: true, allowHTML: true,
- formatter: '<div class="percentage"><div class="bar" style="width:{value}%"></div><div class="percent">{value}%</div></div>' },
- { key: 'link', label: 'Link', allowHTML: true }
- ];
+$(function() {
+ YUI({
+ base: 'js/yui3/',
+ combine: false
+ }).use("datatable", "datatable-sort", function (Y) {
+ var column_defs = [
+ { key: 'name', label: 'Name', sortable: true },
+ { key: 'count', label: 'Count', sortable: true },
+ { key: 'percentage', label: 'Percentage', sortable: true, allowHTML: true,
+ formatter: '<div class="percentage"><div class="bar" style="width:{value}%"></div><div class="percent">{value}%</div></div>' },
+ { key: 'link', label: 'Link', allowHTML: true }
+ ];
- var bugsCountDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.summary.bug_counts
- }).render('#bug_counts');
+ var bugsCountDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.summary.bug_counts
+ }).render('#bug_counts');
- var statusCountsDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.summary.status_counts
- }).render('#status_counts');
+ var statusCountsDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.summary.status_counts
+ }).render('#status_counts');
- var priorityCountsDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.summary.priority_counts
- }).render('#priority_counts');
+ var priorityCountsDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.summary.priority_counts
+ }).render('#priority_counts');
- var severityCountsDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.summary.severity_counts
- }).render('#severity_counts');
+ var severityCountsDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.summary.severity_counts
+ }).render('#severity_counts');
- var assigneeCountsDataTable = new Y.DataTable({
- columns: column_defs,
- data: PD.summary.assignee_counts
- }).render('#assignee_counts');
+ var assigneeCountsDataTable = new Y.DataTable({
+ columns: column_defs,
+ data: PD.summary.assignee_counts
+ }).render('#assignee_counts');
+ });
});
diff --git a/extensions/REMO/template/en/default/bug/create/create-remo-budget.html.tmpl b/extensions/REMO/template/en/default/bug/create/create-remo-budget.html.tmpl
index f1453c356..571fbb0e1 100644
--- a/extensions/REMO/template/en/default/bug/create/create-remo-budget.html.tmpl
+++ b/extensions/REMO/template/en/default/bug/create/create-remo-budget.html.tmpl
@@ -15,7 +15,6 @@
javascript_urls = [ 'extensions/REMO/web/js/form_validate.js',
'js/util.js',
'js/field.js' ]
- yui = [ 'calendar' ]
%]
[% IF user.in_group("mozilla-reps") %]
diff --git a/extensions/REMO/template/en/default/bug/create/create-remo-swag.html.tmpl b/extensions/REMO/template/en/default/bug/create/create-remo-swag.html.tmpl
index 0e2637cf3..85f21cf33 100644
--- a/extensions/REMO/template/en/default/bug/create/create-remo-swag.html.tmpl
+++ b/extensions/REMO/template/en/default/bug/create/create-remo-swag.html.tmpl
@@ -16,7 +16,6 @@
'js/field.js',
'js/util.js' ]
style_urls = [ "extensions/REMO/web/styles/moz_reps.css" ]
- yui = [ 'calendar' ]
%]
[% IF !user.in_group("mozilla-reps") %]
diff --git a/extensions/REMO/template/en/default/pages/remo-form-payment.html.tmpl b/extensions/REMO/template/en/default/pages/remo-form-payment.html.tmpl
index a37df1f89..acf4a98d6 100644
--- a/extensions/REMO/template/en/default/pages/remo-form-payment.html.tmpl
+++ b/extensions/REMO/template/en/default/pages/remo-form-payment.html.tmpl
@@ -28,7 +28,6 @@
'extensions/REMO/web/js/payment.js',
'js/util.js',
'js/field.js' ]
- yui = ['connection', 'json']
%]
<script language="javascript" type="text/javascript"></script>
diff --git a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl
index 9ecaded3f..c2640b422 100644
--- a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl
+++ b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl
@@ -27,17 +27,9 @@
title = "Patch Review"
generate_api_token = 1
header = "Patch Review"
- style_urls = [ "js/yui/assets/skins/sam/container.css",
- "js/yui/assets/skins/sam/button.css",
- "js/yui/assets/skins/sam/datatable.css",
- "extensions/Splinter/web/splinter.css",
+ style_urls = [ "extensions/Splinter/web/splinter.css",
"skins/custom/bug_groups.css" ]
- javascript_urls = [ "js/yui/element/element-min.js",
- "js/yui/container/container-min.js",
- "js/yui/button/button-min.js",
- "js/yui/json/json-min.js",
- "js/yui/datasource/datasource-min.js",
- "js/yui/datatable/datatable-min.js",
+ javascript_urls = [ "js/yui.js",
"extensions/Splinter/web/splinter.js",
"js/field.js" ]
bodyclasses = bodyclasses