Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
70ca109
fixing https and colon in file name
kirkhess Apr 5, 2018
319549a
syntax fixes, fixing hyphen
kirkhess Apr 20, 2018
b0c4d50
hyphen fix
kirkhess Apr 20, 2018
3431ab5
profile and code fixes
kirkhess Apr 26, 2018
9696756
code fixes
kirkhess Apr 27, 2018
ed02e88
Fix for ml38281
May 15, 2018
7ac6840
fixes for PMO
kirkhess Jun 1, 2018
c936d2d
fix merge prob
kirkhess Jun 1, 2018
b43598e
Merge branch 'development' of https://github.com/lcnetdev/bfe into de…
kirkhess Jun 1, 2018
6b23f75
PMO profile
kirkhess Jun 1, 2018
9600e42
fix IBC template
kirkhess Jun 7, 2018
39dd8ea
code fixes, profile update
kirkhess Jun 12, 2018
60d04b5
Add package-lock.json to version control.
wafschneider Jun 21, 2018
fbf0533
Update config-dev.js to load profiles from Verso store.
wafschneider Jun 21, 2018
28f64a8
Display work uri when mouse over heading.
cledvina Jun 21, 2018
2e7c6fd
Merge branch 'development' into load-profiles
wafschneider Jun 22, 2018
f3369e8
Add bootstrap popover that contains resource ID.
cledvina Jun 22, 2018
8052426
Merge pull request #22 from lcnetdev/id-popover
cledvina Jun 22, 2018
352b8cd
Merge branch 'development' into load-profiles
wafschneider Jun 22, 2018
22db37f
Fix indentation of config-dev.js file for readability.
wafschneider Jun 22, 2018
1a2226b
Update bfe code to handle profile data structure as provided by Verso.
wafschneider Jun 22, 2018
289d889
fixes
kirkhess Jun 25, 2018
f751c18
Merge branch 'development' of https://github.com/lcnetdev/bfe into de…
kirkhess Jun 25, 2018
69f99c6
ignore updates
kirkhess Jun 26, 2018
5716b7a
Merge branch 'development' into load-profiles
wafschneider Jun 26, 2018
4660d8b
Merge pull request #23 from lcnetdev/load-profiles
wafschneider Jun 26, 2018
070a7c6
Added rectoBase var for ease in development.
cledvina Jun 27, 2018
d91d117
Disable info tooltip if URI does not begin with "http".
cledvina Jun 27, 2018
2e6b543
Add "Clone Instance" button (instance records only).
cledvina Jun 28, 2018
fc85704
Assing clone button to variable in order to call click function.
cledvina Jun 28, 2018
f4958c2
Added clone function. Need better modal message.
cledvina Jun 28, 2018
b9e60f9
bf fixes
kirkhess Jun 29, 2018
d4eaf0a
Resolved merge issue
kirkhess Jun 29, 2018
81a7472
Load form after cloning.
cledvina Jul 19, 2018
b06430d
Change all triplestore subjects to new resource id when clone is clic…
cledvina Jul 19, 2018
b75641f
Added code to display either metadataAssigner catalogerId in comment …
cledvina Jul 20, 2018
e96fb09
Fix pluck errors for catalogerId.
cledvina Jul 20, 2018
a8c760b
Merge pull request #24 from lcnetdev/clone-instance
cledvina Jul 20, 2018
326bf5e
Added better 'successful clone' message.
cledvina Jul 20, 2018
e3dd821
Merge pull request #25 from lcnetdev/clone-message
cledvina Jul 24, 2018
c5fa610
Updated package-lock.json
cledvina Jul 26, 2018
efb3a4a
Change code to allow for not only instance cloning.
cledvina Jul 26, 2018
ae7e98f
Get clone works function working.
cledvina Jul 26, 2018
7be2f71
Refactor clone stuff, add comments.
cledvina Jul 26, 2018
5a608c5
Add better error message.
cledvina Jul 26, 2018
5ca1a4e
Remove preview pane when clicking browse tab.
cledvina Jul 26, 2018
3ed422e
Preserve hash part of uri in triples s and o nodes.
cledvina Jul 26, 2018
7b773cb
Added input modal for manual resource ID entry.
cledvina Jul 27, 2018
bdc2005
Added clear button to resource id input box.
cledvina Jul 27, 2018
ae4d79e
Merge branch 'development' of https://github.com/lcnetdev/bfe into de…
kirkhess Jul 30, 2018
7d515d0
Merge branch 'clone-works' into development
kirkhess Jul 30, 2018
cf53136
profile fixes
kirkhess Jul 30, 2018
23da2fc
Merge pull request #26 from lcnetdev/clone-works
cledvina Jul 30, 2018
f311097
Do not display clone button in modal windows.
cledvina Jul 31, 2018
7ecb717
create pilot branch
kirkhess Jul 31, 2018
e79bee4
Merge pull request #27 from lcnetdev/clone-not-modal
cledvina Aug 2, 2018
be011d7
Delete extra blank lines and fix indentation.
cledvina Aug 2, 2018
138026a
Added typeahead node to "add property" row.
cledvina Aug 2, 2018
74a59cc
Got typeahead returning properties but not display.
cledvina Aug 6, 2018
9f9e61d
Return ojbect instead of array.
cledvina Aug 6, 2018
93c324c
Get suggestions to display.
cledvina Aug 6, 2018
6c49c52
Add it to typeahead box.
cledvina Aug 6, 2018
fc636e4
Properly read selected typeahead.
cledvina Aug 7, 2018
9a19928
Style new field.
cledvina Aug 7, 2018
4959a37
Add logging.
cledvina Aug 7, 2018
9edf9a4
Remove some logging
cledvina Aug 8, 2018
12c3937
Use only literal or lookup types.
cledvina Aug 8, 2018
9197162
Compile addFields hash when loading profiles.
cledvina Aug 9, 2018
ec2640e
Use propertyLabel as value and key for typeahead.
cledvina Aug 9, 2018
bbad627
Do not include field choices already in resource.
cledvina Aug 9, 2018
b2c5d43
Add field only on main page (not modals).
cledvina Aug 9, 2018
df9fae9
Add addedproperties field to storage.
cledvina Aug 9, 2018
80f955c
Read addedproperties from verso back into form.
cledvina Aug 9, 2018
1a53429
Assign stored addedtemplates to addProperties instead of bfeditor.bfe…
cledvina Aug 10, 2018
4c64265
Added placeholder for "add property" field.
cledvina Aug 10, 2018
547fa15
Merge branch 'development' of https://github.com/lcnetdev/bfe into de…
kirkhess Aug 13, 2018
8459078
Merge pull request #28 from lcnetdev/add-field
cledvina Aug 13, 2018
3494584
Create tab and form for "load marc".
cledvina Aug 14, 2018
22e6b2f
Added profile menu.
cledvina Aug 14, 2018
f90ca1d
Use dropdown menu instead of radio buttons.
cledvina Aug 14, 2018
1c257bf
Assign selected index to #marcdx.
cledvina Aug 14, 2018
0813743
Create SRU search url from input parameters.
cledvina Aug 14, 2018
4bebd43
Wire SRU url to whichrt function.
cledvina Aug 14, 2018
55aa4ff
Set default index to Bib ID.
cledvina Aug 16, 2018
66ab5b1
Added rdfTranslate function.
cledvina Aug 17, 2018
2782c96
Renamed rdfTranslate to rdfxml2store.
cledvina Aug 17, 2018
6558a3b
Change '_:N' nodes to '_:bnode'
cledvina Aug 17, 2018
a5f9618
Change all _:N nodes to _:bnode
cledvina Aug 17, 2018
1230173
Account for undefined o nodes.
cledvina Aug 17, 2018
8a26d25
Update retrieve function to load an rdfxml record.
cledvina Aug 17, 2018
2df2dde
Convert bibframe.example.org to id.loc.gov.
cledvina Aug 21, 2018
1c01e43
Wire-up profile selection dropdown.
cledvina Aug 21, 2018
bd25aec
Determine ajax datatype via bfestore.state value.
cledvina Aug 21, 2018
07dc644
Return configs to default values.
cledvina Aug 21, 2018
7739655
Added 0 padded c numbers and alert for 0 hits.
cledvina Aug 21, 2018
1c2b135
Added better "no hits" modal for MP search.
cledvina Aug 22, 2018
e419119
Append '0001' to the end of instance and item ids.
cledvina Aug 22, 2018
5d00110
Grab rec id from bf:Local field, add rec id to URIs.
cledvina Aug 22, 2018
95d2346
Removed some comments and debuging lines.
cledvina Aug 22, 2018
7601b18
Stop name lookup when 3rd query char is a digit.
cledvina Aug 22, 2018
b19a0b7
Display id in names lookup.
cledvina Aug 22, 2018
1b4b4b1
Added a display element to the jsonp object as well.
cledvina Aug 22, 2018
86ccafb
LCSH displays ID and is searchable by ID.
cledvina Aug 24, 2018
33cb35a
Merge pull request #29 from lcnetdev/load-records-metaproxy
cledvina Aug 24, 2018
dcd3280
Do not display empty parenthesis.
cledvina Aug 24, 2018
000bb09
Process dislpay of IDs in processSuggestions/Atom blocks.
cledvina Aug 24, 2018
88f7d40
Merge pull request #30 from lcnetdev/lookup-by-identifier
cledvina Aug 28, 2018
6986432
fixes to merge
kirkhess Sep 1, 2018
9b4fb73
profiles
kirkhess Sep 1, 2018
12516ec
Merge branch 'development' into bfpilot
kirkhess Sep 1, 2018
3d2ad2e
Merge branch 'development' of https://github.com/lcnetdev/bfe into de…
kirkhess Sep 7, 2018
8beaeeb
Merge pull request #31 from lcnetdev/bfpilot
kirkhess Sep 7, 2018
6ebec80
Add back getProfileOptions function.
cledvina Sep 10, 2018
bd047f5
Merge pull request #32 from lcnetdev/validate-field
cledvina Sep 11, 2018
8fe74ae
Start updating block that deals with valueConstraints.
cledvina Sep 12, 2018
5a83c1b
Convert old defaults model to new.
cledvina Sep 13, 2018
2b1fd58
Move value defaults stuff to "for" loop.
cledvina Sep 13, 2018
0514647
Remove console.log line.
cledvina Sep 13, 2018
5c05458
Removed another useless log step
cledvina Sep 13, 2018
ccb104b
Some formatting.
cledvina Sep 13, 2018
7498c21
Added pattern attr to literals input if validatePattern exists.
cledvina Sep 13, 2018
191f0d8
Add red text to invalid entries.
cledvina Sep 13, 2018
7965cfc
Removed useless log line.
cledvina Sep 13, 2018
778171a
Raise an alert if + button is clicked on invalid value.
cledvina Sep 13, 2018
b5dc827
Merge pull request #35 from lcnetdev/validate-field
cledvina Sep 13, 2018
f7ab5fc
fixes for defaults
kirkhess Sep 14, 2018
6956208
fixes for literal defaults
kirkhess Sep 14, 2018
85175c1
Merge pull request #34 from lcnetdev/defaults-array
cledvina Sep 14, 2018
22ec2f0
Merge branch 'development' of https://github.com/lcnetdev/bfe into de…
kirkhess Sep 18, 2018
37ce005
fix dropdowns
kirkhess Sep 18, 2018
f739111
dropdown fix
kirkhess Sep 18, 2018
b0553dc
fix
kirkhess Sep 18, 2018
90e196e
more fixes for Work import
kirkhess Sep 18, 2018
40c0e5a
merge fixes
kirkhess Sep 18, 2018
c31b212
merge fixes
kirkhess Sep 18, 2018
a50da0b
another fix
kirkhess Sep 18, 2018
13cad50
another fix
kirkhess Sep 18, 2018
4c936c3
Merge pull request #37 from lcnetdev/bfpilot
kirkhess Sep 18, 2018
12685d9
preparing for pull request to master
kirkhess Sep 18, 2018
80bb4b7
Merge branch 'development' of https://github.com/lcnetdev/bfe into de…
kirkhess Sep 18, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,15 @@ builds/bfe.dev.bak
builds/bfe.jodi.bak
builds/bfe.jodi.js
static/profiles/bibframe/Test All (jodiw).json
static/profiles/bibframe/profiles.json

builds/bfe.test.js
static/js/config-test.js
static/profiles/bibframe/BIBFRAME 2.0 Test: Notated Music: Work, Expression, Instance.json
static/profiles/bibframe/Test profile (Prints & Photographs).json
test.html


.csslintrc
.jshintrc
.eslintrc
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function(grunt) {
}
});

grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-uglify-es');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-concat');

Expand Down
368 changes: 171 additions & 197 deletions build_support/mini_require.js
Original file line number Diff line number Diff line change
@@ -1,197 +1,171 @@
/*
kefo: Copied from Ace editor repository. This file is needed
to hook up the requirejs defines so they work with a defined
javascript bfe namespace since we use dryice to build and not requirejs.
https://github.com/ajaxorg/ace/blob/master/build_support/mini_require.js

Beyond the note above, it is not used in any other way. It is only
invoked when building/minifying the code.
*/

/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */

/**
* Define a module along with a payload
* @param module a name for the payload
* @param payload a function to call with (require, exports, module) params
*/

(function() {

var ACE_NAMESPACE = "bfe";

var global = (function() {
return this;
})();


if (!ACE_NAMESPACE && typeof requirejs !== "undefined")
return;


var _define = function(module, deps, payload) {
if (typeof module !== 'string') {
if (_define.original)
_define.original.apply(window, arguments);
else {
console.error('dropping module because define wasn\'t a string.');
console.trace();
}
return;
}

if (arguments.length == 2)
payload = deps;

if (!_define.modules) {
_define.modules = {};
_define.payloads = {};
}

_define.payloads[module] = payload;
_define.modules[module] = null;
};

/**
* Get at functionality define()ed using the function above
*/
var _require = function(parentId, module, callback) {
if (Object.prototype.toString.call(module) === "[object Array]") {
var params = [];
for (var i = 0, l = module.length; i < l; ++i) {
var dep = lookup(parentId, module[i]);
if (!dep && _require.original)
return _require.original.apply(window, arguments);
params.push(dep);
}
if (callback) {
callback.apply(null, params);
}
}
else if (typeof module === 'string') {
var payload = lookup(parentId, module);
if (!payload && _require.original)
return _require.original.apply(window, arguments);

if (callback) {
callback();
}

return payload;
}
else {
if (_require.original)
return _require.original.apply(window, arguments);
}
};

var normalizeModule = function(parentId, moduleName) {
// normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
}
// normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
moduleName = base + "/" + moduleName;

while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}

return moduleName;
};

/**
* Internal function to lookup moduleNames and resolve them by calling the
* definition function if needed.
*/
var lookup = function(parentId, moduleName) {

moduleName = normalizeModule(parentId, moduleName);

var module = _define.modules[moduleName];
if (!module) {
module = _define.payloads[moduleName];
if (typeof module === 'function') {
var exports = {};
var mod = {
id: moduleName,
uri: '',
exports: exports,
packaged: true
};

var req = function(module, callback) {
return _require(moduleName, module, callback);
};

var returnValue = module(req, exports, mod);
exports = returnValue || mod.exports;
_define.modules[moduleName] = exports;
delete _define.payloads[moduleName];
}
module = _define.modules[moduleName] = exports || module;
}
return module;
};

function exportAce(ns) {
var require = function(module, callback) {
return _require("", module, callback);
};

var root = global;
if (ns) {
if (!global[ns])
global[ns] = {};
root = global[ns];
}

if (!root.define || !root.define.packaged) {
_define.original = root.define;
root.define = _define;
root.define.packaged = true;
}

if (!root.require || !root.require.packaged) {
_require.original = root.require;
root.require = require;
root.require.packaged = true;
}
}

exportAce(ACE_NAMESPACE);

})();
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
/**
* Define a module along with a payload
* @param module a name for the payload
* @param payload a function to call with (require, exports, module) params
*/
(function () {
var ACE_NAMESPACE = 'bfe';

var global = (function () {
return this;
})();

if (!ACE_NAMESPACE && typeof requirejs !== 'undefined') { return; }

var _define = function (module, deps, payload) {
if (typeof module !== 'string') {
if (_define.original) { _define.original.apply(window, arguments); } else {
console.error('dropping module because define wasn\'t a string.');
console.trace();
}
return;
}

if (arguments.length === 2) { payload = deps; }

if (!_define.modules) {
_define.modules = {};
_define.payloads = {};
}

_define.payloads[module] = payload;
_define.modules[module] = null;
};

/**
* Get at functionality define()ed using the function above
*/
var _require = function (parentId, module, callback) {
if (Object.prototype.toString.call(module) === '[object Array]') {
var params = [];
for (var i = 0, l = module.length; i < l; ++i) {
var dep = lookup(parentId, module[i]);
if (!dep && _require.original) { return _require.original.apply(window, arguments); }
params.push(dep);
}
if (callback) {
callback.apply(null, params);
}
} else if (typeof module === 'string') {
var payload = lookup(parentId, module);
if (!payload && _require.original) { return _require.original.apply(window, arguments); }

if (callback) {
callback();
}

return payload;
} else {
if (_require.original) { return _require.original.apply(window, arguments); }
}
};

var normalizeModule = function (parentId, moduleName) {
// normalize plugin requires
if (moduleName.indexOf('!') !== -1) {
var chunks = moduleName.split('!');
return normalizeModule(parentId, chunks[0]) + '!' + normalizeModule(parentId, chunks[1]);
}
// normalize relative requires
if (moduleName.charAt(0) === '.') {
var base = parentId.split('/').slice(0, -1).join('/');
moduleName = base + '/' + moduleName;

while (moduleName.indexOf('.') !== -1 && previous !== moduleName) {
var previous = moduleName;
moduleName = moduleName.replace(/\/\.\//, '/').replace(/[^\/]+\/\.\.\//, '');
}
}

return moduleName;
};

/**
* Internal function to lookup moduleNames and resolve them by calling the
* definition function if needed.
*/
var lookup = function (parentId, moduleName) {
moduleName = normalizeModule(parentId, moduleName);
var exports;
var module = _define.modules[moduleName];
if (!module) {
module = _define.payloads[moduleName];
if (typeof module === 'function') {
exports = {};
var mod = {
id: moduleName,
uri: '',
exports: exports,
packaged: true
};

var req = function (module, callback) {
return _require(moduleName, module, callback);
};

var returnValue = module(req, exports, mod);
exports = returnValue || mod.exports;
_define.modules[moduleName] = exports;
delete _define.payloads[moduleName];
}
module = _define.modules[moduleName] = exports || module;
}
return module;
};

function exportAce (ns) {
var require = function (module, callback) {
return _require('', module, callback);
};

var root = global;
if (ns) {
if (!global[ns]) { global[ns] = {}; }
root = global[ns];
}

if (!root.define || !root.define.packaged) {
_define.original = root.define;
root.define = _define;
root.define.packaged = true;
}

if (!root.require || !root.require.packaged) {
_require.original = root.require;
root.require = require;
root.require.packaged = true;
}
}

exportAce(ACE_NAMESPACE);
})();

Loading