diff --git a/ckan/ckan_nose_plugin.py b/ckan/ckan_nose_plugin.py index 58b9d0061a0..a6ff4c0c5f5 100644 --- a/ckan/ckan_nose_plugin.py +++ b/ckan/ckan_nose_plugin.py @@ -70,22 +70,22 @@ def startTest(self, test): """ startTest: start timing. """ - self._started = time.time() +## self._started = time.time() def stopTest(self, test): """ stopTest: stop timing, canonicalize the test name, and save the run time. """ - runtime = time.time() - self._started - - # CTB: HACK! - f = open('times.txt', 'a') - - testname = str(test) - #if ' ' in testname: - # testname = testname.split(' ')[1] - - f.write('%s,%s\n' % (testname, str(runtime))) - - f.close() +## runtime = time.time() - self._started +## +## # CTB: HACK! +## f = open('times.txt', 'a') +## +## testname = str(test) +## #if ' ' in testname: +## # testname = testname.split(' ')[1] +## +## f.write('%s,%s\n' % (testname, str(runtime))) +## +## f.close() diff --git a/ckan/controllers/package.py b/ckan/controllers/package.py index 10cc9d8f128..06816c7c297 100644 --- a/ckan/controllers/package.py +++ b/ckan/controllers/package.py @@ -409,7 +409,7 @@ def new(self, data=None, errors=None, error_summary=None): c.form = render(self.package_form, extra_vars=vars) else: c.form = render(self._package_form(package_type=package_type), extra_vars=vars) - return render( self._new_template('')) + return render( self._new_template(package_type)) def edit(self, id, data=None, errors=None, error_summary=None): diff --git a/ckan/public/img/glyphicons-halflings-white.png b/ckan/public/img/glyphicons-halflings-white.png new file mode 100644 index 00000000000..a20760bfde5 Binary files /dev/null and b/ckan/public/img/glyphicons-halflings-white.png differ diff --git a/ckan/public/img/glyphicons-halflings.png b/ckan/public/img/glyphicons-halflings.png new file mode 100644 index 00000000000..92d4445dfd0 Binary files /dev/null and b/ckan/public/img/glyphicons-halflings.png differ diff --git a/ckan/public/scripts/vendor/recline/css/data-explorer.css b/ckan/public/scripts/vendor/recline/css/data-explorer.css index 208ce906a56..b27e3f82081 100644 --- a/ckan/public/scripts/vendor/recline/css/data-explorer.css +++ b/ckan/public/scripts/vendor/recline/css/data-explorer.css @@ -23,39 +23,32 @@ height: 30px; } -.header .recline-query-editor form { - height: 30px; - margin-bottom: 0; +.header .recline-query-editor .input-prepend { + margin-bottom: auto; } -.header .recline-query-editor label { - float: none; +.header .recline-query-editor .text-query input { + float: left; } -.header .recline-query-editor label { - float: none; +.recline-query-editor .text-query .btn-group { + display: inline; + float:left; + margin-left:-2px; } -.header .recline-query-editor input.text-query { - float: left; - margin-top: 1px; - margin-right: 5px; - width: 200px; +.recline-query-editor .text-query .btn-group .dropdown-toggle { + -moz-border-radius:0px 3px 3px 0px; + -webkit-border-radius:0px 3px 3px 0px; + border-radius:0px 3px 3px 0px; } -.header .recline-query-editor .pagination input { - width: 30px; - height: 18px; - padding: 2px 4px; - margin-top: -4px; +.recline-query-editor .text-query .btn-group ul { + margin-left:-110px; } .header .recline-query-editor .pagination a { - line-height: 28px; -} - -.header .recline-query-editor form .btn { - vertical-align: top; + line-height: 26px; } .data-view-container { @@ -79,6 +72,11 @@ * Data Table *********************************************************/ +.data-table .btn-group .dropdown-toggle { + padding: 1px 3px; + line-height: auto; +} + .data-table-container { overflow: auto; height: 550px; @@ -86,7 +84,6 @@ .data-table { border: 1px solid #ccc; - font-size: 12px; width: 100%; } @@ -100,44 +97,46 @@ width: 20px; } +/* direct borrowing from twitter buttons */ +.data-table th, +.transform-column-view .expression-preview-table-wrapper th +{ + background-color: #e6e6e6; + background-repeat: no-repeat; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); + background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6); + background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); + background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); + background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + color: #333; + border: 1px solid #ccc; + border-bottom-color: #bbb; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -webkit-transition: 0.1s linear all; + -moz-transition: 0.1s linear all; + -ms-transition: 0.1s linear all; + -o-transition: 0.1s linear all; + transition: 0.1s linear all; +} + + /********************************************************** * Data Table Menus *********************************************************/ -a.column-header-menu, a.root-header-menu { +.column-header-menu, a.root-header-menu { float: right; - display: block; - margin: 0 4px 0 0; - width: 17px; - height: 19px; - background-image: url(images/menu-dropdown.png); - background-repeat: no-repeat; -} - -a.row-header-menu:hover, a.root-header-menu:hover { - background-position: -17px 0px; - text-decoration: none; -} - -a.row-header-menu { - float: left; - display: block; - margin: -2px 0 -4px 0; - width: 17px; - height: 18px; - background-image: url(images/menu-dropdown.png); - background-repeat: no-repeat; } .read-only a.row-header-menu { display: none; } -a.column-header-menu:hover { - background-position: -17px 0px; - text-decoration: none; -} - .column-header-recon-stats-bar { margin-top: 10px; height: 4px; @@ -203,45 +202,6 @@ div.data-table-cell-content-numeric > a.data-table-cell-edit { color: red; } -.data-table-menu-overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -ul.data-table-menu { - display: none; - outline-style: none; - background: white; - color: black; - font-size: 12px; - height: auto; - list-style: none; - overflow: hidden; - position: absolute; - text-align: left; - width: 120px; - z-index: 666; - border: 1px solid #CCC; - border-right: 1px solid #666; - border-bottom: 1px solid #666; - margin: 0; padding: 0; } - ul.data-table-menu * { - margin: 0; - padding: 0; } - ul.data-table-menu a { - line-height: 14px; - color: black; - display: block; - padding: 5px 7px; - text-decoration: none; } - ul.data-table-menu li { - height: 24px; } - ul.data-table-menu li:hover { - background-color: #DBE8F8 } - /* TODO: not sure the rest of this is needed */ .data-table-cell-editor, .data-table-topic-popup { overflow: auto; diff --git a/ckan/public/scripts/vendor/recline/recline.js b/ckan/public/scripts/vendor/recline/recline.js index 3102ad36c70..ee6f6fa33b6 100644 --- a/ckan/public/scripts/vendor/recline/recline.js +++ b/ckan/public/scripts/vendor/recline/recline.js @@ -131,14 +131,13 @@ this.recline.Model = this.recline.Model || {}; // ## A Dataset model // -// A model must have the following (Backbone) attributes: +// A model has the following (non-Backbone) attributes: // // * fields: (aka columns) is a FieldList listing all the fields on this -// Dataset (this can be set explicitly, or, on fetch() of Dataset -// information from the backend, or as is perhaps most common on the first -// query) -// * currentDocuments: a DocumentList containing the Documents we have currently loaded for viewing (you update currentDocuments by calling getRows) -// * docCount: total number of documents in this dataset (obtained on a fetch for this Dataset) +// Dataset (this can be set explicitly, or, will be set by Dataset.fetch() or Dataset.query() +// * currentDocuments: a DocumentList containing the Documents we have +// currently loaded for viewing (you update currentDocuments by calling query) +// * docCount: total number of documents in this dataset my.Dataset = Backbone.Model.extend({ __type__: 'Dataset', initialize: function(model, backend) { @@ -166,7 +165,7 @@ my.Dataset = Backbone.Model.extend({ query: function(queryObj) { this.trigger('query:start'); var self = this; - this.queryState.set(queryObj, {silent: true}); + this.queryState.set(queryObj); var dfd = $.Deferred(); this.backend.query(this, this.queryState.toJSON()).done(function(rows) { var docs = _.map(rows, function(row) { @@ -255,18 +254,6 @@ my.backends = {}; var util = function() { var templates = { transformActions: '
  • Global transform...
  • ' - , columnActions: ' \ -
  • Transform...
  • \ -
  • Delete this column
  • \ -
  • Sort ascending
  • \ -
  • Sort descending
  • \ -
  • Hide this column
  • \ - ' - , rowActions: '
  • Delete this row
  • ' - , rootActions: ' \ - {{#columns}} \ -
  • Show column: {{.}}
  • \ - {{/columns}}' , cellEditor: ' \