obj.controller.init(
{
control_map : {
+ 'sel_clip' : [
+ ['command'],
+ function() { obj.list.clipboard(); }
+ ],
'cmd_broken' : [
['command'],
function() { alert('Not Yet Implemented'); }
'on_select' : function(ev) {
JSAN.use('util.functional');
var sel = obj.list.retrieve_selection();
+ obj.controller.view.sel_clip.disabled = sel.length < 1;
obj.sel_list = util.functional.map_list(
sel,
function(o) { return o.getAttribute('retrieve_id'); }
<commandset id="cat_copy_browser">
<command id="cmd_broken" />
+ <command id="sel_clip" />
<command id="cmd_clear" />
<command id="cmd_show_my_libs" />
<command id="cmd_show_all_libs" />
<popupset>
<popup id="copy_browser_actions">
+ <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C"/>
+ <menuseparator/>
<menuitem command="cmd_add_items" label="Add Items" accesskey="I"/>
<menuitem command="cmd_add_items_to_buckets" label="Add Items to Buckets" accesskey="A"/>
<menuitem command="cmd_edit_items" label="Edit Item Attributes" accesskey="E"/>
<menubar>
<menu label="Actions for Selected Rows" accesskey="f">
<menupopup>
+ <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C"/>
+ <menuseparator/>
<menuitem command="cmd_add_items" label="Add Items" accesskey="I"/>
<menuitem command="cmd_add_items_to_buckets" label="Add Items to Buckets" accesskey="A"/>
<menuitem command="cmd_edit_items" label="Edit Item Attributes" accesskey="E"/>
try {
JSAN.use('util.functional');
var sel = obj.list2.retrieve_selection();
+ document.getElementById('clip_button').disabled = sel.length < 1;
obj.selection_list2 = util.functional.map_list(
sel,
function(o) { return JSON2js(o.getAttribute('retrieve_id')); }
obj.controller.init(
{
'control_map' : {
+ 'sel_clip' : [
+ ['command'],
+ function() { obj.list2.clipboard(); }
+ ],
'copy_buckets_menulist_placeholder' : [
['render'],
function(e) {
</script>
<commandset id="copy_buckets_cmds">
+ <command id="sel_clip" />
<command id="cmd_copy_buckets_submit_barcode" />
<command id="cmd_copy_buckets_print" />
<command id="cmd_copy_buckets_reprint" />
<button command="copy_buckets_new_bucket" label="New Bucket"/>
<button command="copy_buckets_delete_bucket" label="Delete Bucket"/>
<spacer flex="1"/>
+ <button id="clip_button" command="sel_clip" label="Copy to Clipboard" disabled="true" />
<button command="copy_buckets_delete_item" label="Delete Selected" disabled="true" image="/xul/server/skin/media/images/icon_delete.gif"/>
<button command="copy_buckets_export" label="Add Selected" disabled="true" image="/xul/server/skin/media/images/up_arrow.gif"/>
</hbox>
try {
JSAN.use('util.functional');
var sel = obj.list2.retrieve_selection();
+ document.getElementById('clip_button').disabled = sel.length < 1;
obj.selection_list2 = util.functional.map_list(
sel,
function(o) { return JSON2js(o.getAttribute('retrieve_id')); }
obj.controller.init(
{
'control_map' : {
+ 'sel_clip' : [
+ ['command'],
+ function() { obj.list2.clipboard(); }
+ ],
'record_buckets_menulist_placeholder' : [
['render'],
function(e) {
</script>
<commandset id="record_buckets_cmds">
+ <command id="sel_clip" />
<command id="cmd_record_buckets_submit_barcode" />
<command id="cmd_record_buckets_print" />
<command id="cmd_record_buckets_reprint" />
<button id="record_buckets_new_bucket" label="New Bucket"/>
<button id="record_buckets_delete_bucket" label="Delete Bucket"/>
<spacer flex="1"/>
+ <button id="clip_button" command="sel_clip" label="Copy to Clipboard" disabled="true" />
<button id="record_buckets_delete_item" label="Delete Selected" disabled="true" image="/xul/server/skin/media/images/icon_delete.gif"/>
<button id="record_buckets_export" label="Add Selected" disabled="true" image="/xul/server/skin/media/images/up_arrow.gif"/>
</hbox>
try {
JSAN.use('util.functional');
var sel = obj.list.retrieve_selection();
+ document.getElementById('clip_button').disabled = sel.length < 1;
var list = util.functional.map_list(
sel,
function(o) { return o.getAttribute('retrieve_id'); }
obj.controller.init(
{
control_map : {
+ 'sel_clip' : [
+ ['command'],
+ function() { obj.list.clipboard(); }
+ ],
'cmd_broken' : [
['command'],
function() { alert('Not Yet Implemented'); }
<commandset id="cat_z3950_cmds">
<command id="cmd_broken" />
+ <command id="sel_clip" />
</commandset>
<groupbox flex="1">
<vbox id="result_message" />
<hbox>
<button id="page_next" label="Fetch More Results" accesskey="M" disabled="true"/>
+ <button id="clip_button" command="sel_clip" label="Copy to Clipboard" disabled="true"/>
<spacer flex="1"/>
<button id="marc_view" label="MARC View" accesskey="V" disabled="true"/>
<button id="marc_import_overlay" label="MARC Editor for Overlay" accesskey="O" disabled="true"/>