within our own bubble */
var _xhtml_ns = "http://www.w3.org/1999/xhtml";
- var _dump = dump ?
- function(s) { dump(s + "\n"); } : (
- console && console.log ?
- function(s) { console.log(s) } : alert
- );
function _show_button(n, yes) { /* yet another hide/reveal thing */
/* This is a re-invented wheel, but I was having trouble
/* Initialize and save misc values, and call build() to
* make and place widgets. */
- this.onapply = args.onapply ||
- function() { _dump("no onapply() given"); };
+ this.onapply = args.onapply;
this.step = 'a';
this.more_back = false;
*/
/* Step 1 */
- _dump("move() step 1");
_show_button(this.back_button, false);
_show_button(this.forward_button, false);
* user control yet (initializing whole wizard still). */
var a_changed = false;
if (this.step_user_control) {
- _dump("move() step 2");
a_changed = this.update_value_slot(
this._get_step_slot(),
this.get_step_value_from_control()
* may have just changed if step was 'a' and b) all the
* subfields for that ptype, which we may have to
* retrieve asynchronously. */
- _dump("move() step 3 (prep)");
this._get_subfields_for_type(
this.value.substr(0, 1), /* working_ptype */
/* and then: */ dojo.hitch(this, function() {
if (a_changed) this._default_after_00();
/* Step 3 proper: */
- _dump("move() step 3 (proper)");
this._move_step(offset);
/* Step 4: For the call to update_question, we had
* better have values loaded for our current step.
*/
- _dump("move() step 4 (prep)");
this._get_values_for_step(
this.step,
/* and then: */ dojo.hitch(this, function(l, v){
/* Step 4 proper: */
- _dump("move() step 4 (proper)");
this.update_value_label();
- _dump("move() step 4 (proper) - part 2");
this.update_question(l, v);
/* Step 5 */
- _dump("move() step 5");
this.update_pagers();
if (typeof callback == "function") {
- _dump("move() step 6");
callback();
}
})
'toolbar_labelpos' : 'side',
'url_prefix' : function(url,secure) {
- dump("in this url_prefix()\n");
// This allows urls to start with a urls key (or be only a urls key)
// We stop at the first / or ? to allow extra paths and query strings.
- dump("1\n");
var base_url = url.match(/^[^?/|]+/);
- dump("2\n");
if(base_url) {
- dump("3\n");
base_url = base_url[0];
- dump("4\n");
- if(urls[base_url]) {
- dump("5\n");
+ if(urls[base_url])
url = url.replace(/^[^?/|]+\|?/, urls[base_url]);
- }
- dump("6\n");
}
- dump("7\n");
// if host unspecified URL with leading /, prefix the remote hostname
if (url.match(/^\//)) url = urls.remote + url;
// if it starts with http:// and we want secure, convert to https://
- dump("8\n");
if (secure && url.match(/^http:\/\//)) {
- dump("9\n");
url = url.replace(/^http:\/\//, 'https://');
}
- dump("10\n");
// if it doesn't start with a known protocol, add http(s)://
if (! url.match(/^(http|https|chrome|oils):\/\//) && ! url.match(/^data:/) ) {
- dump("11\n");
url = secure
? 'https://' + url
: 'http://' + url;
}
function changeFFEditor (type) {
- dump("changeFFEditor()\n");
var grid = document.getElementById('leaderGrid');
grid.setAttribute('type',type);
document.getElementById('recordTypeLabel').setAttribute('value',type);
type,
function() {
updateFFEditorContexts(grid, type);
- dump("you should have fixed field editor context menus now\n");
},
function() {
- dump(
+ alert( /* XXX i18n - the marc editor either isn't tied in to
+ an overall i18n infrastructure, or it's different
+ enough from other Evergreen parts that I don't
+ understand the right way to do i18n here */
"failed to load fixed field values for rec_type '" +
type + "'\n"
);
var code = v[0];
var el = document.getElementById(name + "_tb");
window[funcname] = function() {
- dump("running " + funcname + " and name is " + name + " and el is " + el + "\n");
el.value = code;
updateFixedFields(el);
};