Skip to content

Commit

Permalink
Merge pull request #23 from dannon/remove_gridhelper_001
Browse files Browse the repository at this point in the history
Some fixes and cleanup, makes the merge clean.
  • Loading branch information
guerler committed Dec 14, 2017
2 parents c19ef1a + b832fec commit 609020d
Show file tree
Hide file tree
Showing 115 changed files with 407 additions and 553 deletions.
84 changes: 0 additions & 84 deletions .ci/py3_sources.txt

This file was deleted.

2 changes: 1 addition & 1 deletion client/galaxy/scripts/apps/admin.js
Expand Up @@ -10,7 +10,7 @@ import QueryStringParsing from "utils/query-string-parsing";
import Router from "layout/router";
import Utils from "utils/utils";
import Page from "layout/page";
import Vue from "libs/vue";
import Vue from "vue";
import UserAPIKeys from "components/UserAPIKeys.vue";

window.app = function app(options, bootstrapped) {
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/apps/analysis.js
Expand Up @@ -22,7 +22,7 @@ import Ui from "mvc/ui/ui-misc";
import DatasetError from "mvc/dataset/dataset-error";
import DatasetEditAttributes from "mvc/dataset/dataset-edit-attributes";
import Citations from "components/Citations.vue";
import Vue from "libs/vue";
import Vue from "vue";

/** define the 'Analyze Data'/analysis/main/home page for Galaxy
* * has a masthead
Expand Down
8 changes: 2 additions & 6 deletions client/galaxy/scripts/galaxy.interactive_environments.js
Expand Up @@ -6,9 +6,7 @@
export function append_notebook(url) {
clear_main_area();
$("#main").append(
`<iframe frameBorder="0" seamless="seamless" style="width: 100%; height: 100%; overflow:hidden;" scrolling="no" src="${
url
}"></iframe>`
`<iframe frameBorder="0" seamless="seamless" style="width: 100%; height: 100%; overflow:hidden;" scrolling="no" src="${url}"></iframe>`
);
}

Expand All @@ -21,9 +19,7 @@ export function clear_main_area() {

export function display_spinner() {
$("#main").append(
`<img id="spinner" src="${
galaxy_root
}static/style/largespinner.gif" style="position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;">`
`<img id="spinner" src="${galaxy_root}static/style/largespinner.gif" style="position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;">`
);
}

Expand Down
6 changes: 1 addition & 5 deletions client/galaxy/scripts/galaxy.pages.js
Expand Up @@ -154,11 +154,7 @@ WYMeditor.editor.prototype.dialog = function(dialogType, dialogFeatures, bodyHtm
}
show_modal(
"Create Link",
`<div><div><label id='link_attribute_label'>URL <span style='float: right; font-size: 90%'><a href='#' id='set_link_id'>Create in-page anchor</a></span></label><br><input type='text' class='wym_href' value='${
curURL
}' size='40' /></div><div><label>Title</label><br><input type='text' class='wym_title' value='${
curTitle
}' size='40' /></div><div>`,
`<div><div><label id='link_attribute_label'>URL <span style='float: right; font-size: 90%'><a href='#' id='set_link_id'>Create in-page anchor</a></span></label><br><input type='text' class='wym_href' value='${curURL}' size='40' /></div><div><label>Title</label><br><input type='text' class='wym_title' value='${curTitle}' size='40' /></div><div>`,
{
"Make link": function() {
// Get URL, name/title.
Expand Down
6 changes: 3 additions & 3 deletions client/galaxy/scripts/layout/modal.js
Expand Up @@ -154,9 +154,9 @@ function show_in_overlay(options) {
closeButton: true,
title: "&nbsp;",
body: $(
`<div style='margin: -5px;'><iframe style='margin: 0; padding: 0;' src='${options.url}' width='${
width
}' height='${height}' scrolling='${scroll}' frameborder='0'></iframe></div>`
`<div style='margin: -5px;'><iframe style='margin: 0; padding: 0;' src='${
options.url
}' width='${width}' height='${height}' scrolling='${scroll}' frameborder='0'></iframe></div>`
)
});
modal.show({ backdrop: true });
Expand Down
@@ -1,6 +1,4 @@
// dependencies

// grid model
// legacy grid model, used by reports and toolshed
export default Backbone.Model.extend({
defaults: {
url_base: "",
Expand Down
Expand Up @@ -112,14 +112,12 @@ export default {
body: function(options) {
// initialize
var tmpl = "";
var num_rows_rendered = 0;
var items_length = options.items.length;

// empty grid?
if (items_length === 0) {
// No results.
tmpl += '<tr><td colspan="100"><em>No Items</em></td></tr>';
num_rows_rendered = 1;
}

// create rows
Expand Down Expand Up @@ -180,9 +178,7 @@ export default {
if (options.operations.length !== 0) {
tmpl += `<div id="${id}" class="${cls}" style="float: left;">`;
}
tmpl += `<a class="menubutton-label use-target" target="${target}" href="${
link
}" onclick="return false;">${value}</a>`;
tmpl += `<a class="menubutton-label use-target" target="${target}" href="${link}" onclick="return false;">${value}</a>`;
if (options.operations.length !== 0) {
tmpl += "</div>";
}
Expand All @@ -195,7 +191,6 @@ export default {
}
}
tmpl += "</tr>";
num_rows_rendered++;
}
return tmpl;
},
Expand Down Expand Up @@ -262,21 +257,13 @@ export default {
if (page_index == options.cur_page_num) {
tmpl += `<span class="page-link inactive-link" id="page-link-${page_index}">${page_index}</span>`;
} else {
tmpl += `<span class="page-link" id="page-link-${
page_index
}"><a href="javascript:void(0);" onclick="return false;" page_num="${page_index}">${
page_index
}</a></span>`;
tmpl += `<span class="page-link" id="page-link-${page_index}"><a href="javascript:void(0);" onclick="return false;" page_num="${page_index}">${page_index}</a></span>`;
}
}

// show last page
if (max_page < num_pages) {
tmpl += `...<span class="page-link" id="page-link-${
num_pages
}"><a href="javascript:void(0);" onclick="return false;" page_num="${num_pages}">${
num_pages
}</a></span>`;
tmpl += `...<span class="page-link" id="page-link-${num_pages}"><a href="javascript:void(0);" onclick="return false;" page_num="${num_pages}">${num_pages}</a></span>`;
}
tmpl += "</span>";

Expand Down Expand Up @@ -386,9 +373,7 @@ export default {
//
// standard search
//
var tmpl = `<div id="standard-search" style="display: ${
standard_search_display
};"><table><tr><td style="padding: 0;"><table>`;
var tmpl = `<div id="standard-search" style="display: ${standard_search_display};"><table><tr><td style="padding: 0;"><table>`;

// add standard filters
for (let column of options.columns) {
Expand All @@ -411,9 +396,7 @@ export default {
//
// advanced search
//
tmpl += `<div id="advanced-search" style="display: ${
advanced_search_display
}; margin-top: 5px; border: 1px solid #ccc;"><table><tr><td style="text-align: left" colspan="100"><a href="" class="advanced-search-toggle">Close Advanced Search</a></td></tr>`;
tmpl += `<div id="advanced-search" style="display: ${advanced_search_display}; margin-top: 5px; border: 1px solid #ccc;"><table><tr><td style="text-align: left" colspan="100"><a href="" class="advanced-search-toggle">Close Advanced Search</a></td></tr>`;

// add advanced filters
for (let column of options.columns) {
Expand Down Expand Up @@ -456,9 +439,9 @@ export default {
if (column.is_text) {
filter_value = JSON.stringify(filter_value);
}
tmpl += `<input type="hidden" id="${column.key}" name="f-${column.key}" value="${
filter_value
}"/>`;
tmpl += `<input type="hidden" id="${column.key}" name="f-${
column.key
}" value="${filter_value}"/>`;
}
}
}
Expand Down Expand Up @@ -510,9 +493,7 @@ export default {
// print input field for column
tmpl += `
<span class="search-box">
<input class="search-box-input" id="input-${column_key}-filter" name="f-${
column_key
}" type="text" placeholder="${value}" size="${size}"/>
<input class="search-box-input" id="input-${column_key}-filter" name="f-${column_key}" type="text" placeholder="${value}" size="${size}"/>
<button type="submit" style="background: transparent; border: none; padding: 4px; margin: 0px;">
<i class="fa fa-search"></i>
</button>
Expand Down Expand Up @@ -547,11 +528,7 @@ export default {
if (filter && cf[column_key] && filter == cf_arg) {
tmpl += `<span class="categorical-filter ${column_key}-filter current-filter">${cf_label}</span>`;
} else {
tmpl += `<span class="categorical-filter ${
column_key
}-filter"><a href="javascript:void(0);" filter_key="${cf_key}" filter_val="${cf_arg}">${
cf_label
}</a></span>`;
tmpl += `<span class="categorical-filter ${column_key}-filter"><a href="javascript:void(0);" filter_key="${cf_key}" filter_val="${cf_arg}">${cf_label}</a></span>`;
}
}
tmpl += "</span>";
Expand All @@ -565,10 +542,6 @@ export default {
// template for filter items
filter_element: function(filter_key, filter_value) {
filter_value = Utils.sanitize(filter_value);
return `<span class="text-filter-val">${filter_value}<a href="javascript:void(0);" filter_key="${
filter_key
}" filter_val="${
filter_value
}"><i class="fa fa-times" style="padding-left: 5px; padding-bottom: 6px;"/></a></span>`;
return `<span class="text-filter-val">${filter_value}<a href="javascript:void(0);" filter_key="${filter_key}" filter_val="${filter_value}"><i class="fa fa-times" style="padding-left: 5px; padding-bottom: 6px;"/></a></span>`;
}
};
Expand Up @@ -4,8 +4,8 @@ jQuery.ajaxSettings.traditional = true;

// dependencies
import Utils from "utils/utils";
import GridModel from "mvc/grid/grid-model";
import Templates from "mvc/grid/grid-template";
import GridModel from "legacy/grid/grid-model";
import Templates from "legacy/grid/grid-template";
import PopupMenu from "mvc/ui/popup-menu";
// grid view
export default Backbone.View.extend({
Expand Down

0 comments on commit 609020d

Please sign in to comment.