From: <tob...@us...> - 2014-05-02 18:03:10
|
Revision: 8167 http://sourceforge.net/p/bigdata/code/8167 Author: tobycraig Date: 2014-05-02 18:03:07 +0000 (Fri, 02 May 2014) Log Message: ----------- Changed Load to Update Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/css/style.css branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/index.html branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/js/workbench.js Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/css/style.css =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/css/style.css 2014-05-02 16:52:45 UTC (rev 8166) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/css/style.css 2014-05-02 18:03:07 UTC (rev 8167) @@ -229,12 +229,12 @@ margin: 20px auto; } -#load-load { +#update-update { margin: 0 auto; display: block; } -#load-buttons { +#update-buttons { text-align: center; } @@ -250,7 +250,7 @@ border: none; } -#advanced-features, #query-response, #query-pagination, #query-explanation, #query-export-container, #load-response, #load-clear-container, #explore-results, #namespace-properties { +#advanced-features, #query-response, #query-pagination, #query-explanation, #query-export-container, #update-response, #update-clear-container, #explore-results, #namespace-properties { display: none; } @@ -271,7 +271,7 @@ float: right; } -#load-box, #query-box { +#update-box, #query-box { background-color: transparent; padding: 2px; border-width: 1px; @@ -279,13 +279,13 @@ } /* these should have the same typography so the error highlighting matches up with the query text */ -#load-box, #load-errors, #query-box, #query-errors { +#update-box, #update-errors, #query-box, #query-errors { font-family: sans-serif; font-size: 90%; line-height: normal; } -#load-errors, #query-errors { +#update-errors, #query-errors { position: absolute; z-index: -1; padding: 8px 3px; @@ -349,7 +349,7 @@ text-align: right; } -#load-clear-container { +#update-clear-container { text-align: right; } Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/index.html =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/index.html 2014-05-02 16:52:45 UTC (rev 8166) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/index.html 2014-05-02 18:03:07 UTC (rev 8167) @@ -21,7 +21,7 @@ <div id="tab-selector"> <a data-target="query" class="active">Query</a> - <a data-target="load">Load</a> + <a data-target="update">Update</a> <a data-target="explore">Explore</a> <a data-target="status">Status</a> <a data-target="performance">Performance</a> @@ -29,7 +29,7 @@ <p>Current namespace: <span id="current-namespace"></span></p> </div> - <div class="tab" id="load-tab"> + <div class="tab" id="update-tab"> <div class="box"> @@ -37,14 +37,14 @@ </div> <div> - <div id="load-errors"></div> - <textarea id="load-box" placeholder="(Type in or drag a file containing RDF data, a SPARQL update or a file path or URL)"></textarea> + <div id="update-errors"></div> + <textarea id="update-box" placeholder="(Type in or drag a file containing RDF data, a SPARQL update or a file path or URL)"></textarea> </div> <p id="large-file-message">Your file <span id="filename"></span> is too large to display here, but will be uploaded as normal. <a href="#" id="clear-file">Remove file</a></p> <p> - <input type="file" id="load-file"><br> - <label for="load-type">Type:</label> - <select id="load-type"> + <input type="file" id="update-file"><br> + <label for="update-type">Type:</label> + <select id="update-type"> <option value="sparql" selected="selected">SPARQL Update</option> <option value="rdf">RDF Data</option> <option value="path">File Path or URL</option> @@ -62,16 +62,16 @@ </select> </p> <hr class="shadow"> - <button id="load-load">Load</button> + <button id="update-update">Update</button> </div> - <div class="box" id="load-response"> + <div class="box" id="update-response"> <pre></pre> </div> - <div class="box" id="load-clear-container"> - <button id="load-clear">Clear output</button> + <div class="box" id="update-clear-container"> + <button id="update-clear">Clear output</button> </div> </div> @@ -96,7 +96,7 @@ <hr class="shadow"> - <div id="load-buttons"> + <div id="update-buttons"> <input type="submit" value="Execute"> <input type="reset" value="Clear"> </div> Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/js/workbench.js 2014-05-02 16:52:45 UTC (rev 8166) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/js/workbench.js 2014-05-02 18:03:07 UTC (rev 8167) @@ -220,7 +220,7 @@ }); -/* Load */ +/* Update */ function handleDragOver(e) { e.stopPropagation(); @@ -248,38 +248,38 @@ // if file is too large, tell user to supply local path if(f.size > 1048576 * 100) { alert('File too large, enter local path to file'); - $('#load-box').val('/path/to/' + f.name); + $('#update-box').val('/path/to/' + f.name); setType('path'); - $('#load-box').prop('disabled', false) + $('#update-box').prop('disabled', false) $('#large-file-message, #clear-file').hide(); } else { var fr = new FileReader(); fr.onload = function(e2) { if(f.size > 10240) { // do not use textarea - $('#load-box').prop('disabled', true) + $('#update-box').prop('disabled', true) $('#filename').html(f.name); $('#large-file-message, #clear-file').show() - $('#load-box').val(''); + $('#update-box').val(''); FILE_CONTENTS = e2.target.result; } else { // display file contents in the textarea clearFile(); - $('#load-box').val(e2.target.result); + $('#update-box').val(e2.target.result); } guessType(f.name.split('.').pop().toLowerCase(), e2.target.result); }; fr.readAsText(f); } - $('#load-file').val(''); + $('#update-file').val(''); } function clearFile(e) { if(e) { e.preventDefault(); } - $('#load-box').prop('disabled', false) + $('#update-box').prop('disabled', false) $('#large-file-message, #clear-file').hide() FILE_CONTENTS = null; } @@ -332,7 +332,7 @@ } function setType(type, format) { - $('#load-type').val(type); + $('#update-type').val(type); if(type == 'rdf') { $('#rdf-type').val(format); } @@ -364,28 +364,28 @@ var sparql_update_commands = ['INSERT', 'DELETE']; -$('#load-file').change(handleFile); -$('#load-box').on('dragover', handleDragOver) +$('#update-file').change(handleFile); +$('#update-box').on('dragover', handleDragOver) .on('drop', handleFile) .on('paste', handlePaste) - .on('input propertychange', function() { $('#load-errors').hide(); }) - .bind('keydown', 'ctrl+return', submitLoad); + .on('input propertychange', function() { $('#update-errors').hide(); }) + .bind('keydown', 'ctrl+return', submitUpdate); $('#clear-file').click(clearFile); -$('#load-load').click(submitLoad); +$('#update-update').click(submitUpdate); -function submitLoad(e) { +function submitUpdate(e) { e.preventDefault(); var settings = { type: 'POST', - data: FILE_CONTENTS == null ? $('#load-box').val() : FILE_CONTENTS, + data: FILE_CONTENTS == null ? $('#update-box').val() : FILE_CONTENTS, success: updateResponseXML, error: updateResponseError } // determine action based on type - switch($('#load-type').val()) { + switch($('#update-type').val()) { case 'sparql': settings.data = 'update=' + encodeURIComponent(settings.data); settings.success = updateResponseHTML; @@ -407,15 +407,15 @@ break; } - $('#load-response').show(); - $('#load-response pre').html('Data loading...'); + $('#update-response').show(); + $('#update-response pre').html('Data loading...'); $.ajax(NAMESPACE_URL, settings); } -$('#load-clear').click(function() { - $('#load-response, #load-clear').hide(); - $('#load-response pre').text(''); +$('#update-clear').click(function() { + $('#update-response, #update-clear').hide(); + $('#update-response pre').text(''); }); $('#advanced-features-toggle').click(function() { @@ -424,21 +424,21 @@ }); function updateResponseHTML(data) { - $('#load-response, #load-clear').show(); - $('#load-response pre').html(data); + $('#update-response, #update-clear').show(); + $('#update-response pre').html(data); } function updateResponseXML(data) { var modified = data.childNodes[0].attributes['modified'].value; var milliseconds = data.childNodes[0].attributes['milliseconds'].value; - $('#load-response, #load-clear').show(); - $('#load-response pre').text('Modified: ' + modified + '\nMilliseconds: ' + milliseconds); + $('#update-response, #update-clear').show(); + $('#update-response pre').text('Modified: ' + modified + '\nMilliseconds: ' + milliseconds); } function updateResponseError(jqXHR, textStatus, errorThrown) { - $('#load-response, #load-clear').show(); - $('#load-response pre').text('Error! ' + textStatus + ' ' + jqXHR.statusText); - highlightError(jqXHR.statusText, 'load'); + $('#update-response, #update-clear').show(); + $('#update-response pre').text('Error! ' + textStatus + ' ' + jqXHR.statusText); + highlightError(jqXHR.statusText, 'update'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |