function patchDomainPickerIcon() {

      function getDomainId() {
        var sys_id = $('#domain_picker_select').val();
        if (sys_id) {
          sys_id = sys_id.split(':').pop(); // remove 'string:' prefix
        }
        return sys_id;
      }

      function callback(invokedOn, selectedMenu) {
        var domain_id = getDomainId(),
            text = selectedMenu.text(),
            item,
            i;
        for (i = 0; i < items.length; i++) {
          item = items[i];
          if (item.name == text) {
            executeMenuItem(item, {
              domain_table: domain_table,
              domain_id: domain_id
            });
            return;
          }
        }
        jslog('Unknown item selected: "' + text + '"');
      }

      var domain_table = config.picker_icon.domain_table;
      var items = snd_ui16_developer_patch_menus.domain();

      patchIcon('domain', 'concourse-domain-picker', items, callback);
    }
/**
     * Patch the Domain picker icon with a context menu.
     *
     * @return {undefined}
     */
Patch the Domain picker icon with a context menu.
@return {undefined}
Patch the Domain picker icon with a context menu . @return { undefined }
function patchDomainPickerIcon() {
      function getDomainId() {
        var sys_id = $('#domain_picker_select').val();
        if (sys_id) {
          sys_id = sys_id.split(':').pop(); 
        }
        return sys_id;
      }
      function callback(invokedOn, selectedMenu) {
        var domain_id = getDomainId(),
            text = selectedMenu.text(),
            item,
            i;
        for (i = 0; i < items.length; i++) {
          item = items[i];
          if (item.name == text) {
            executeMenuItem(item, {
              domain_table: domain_table,
              domain_id: domain_id
            });
            return;
          }
        }
        jslog('Unknown item selected: "' + text + '"');
      }
      var domain_table = config.picker_icon.domain_table;
      var items = snd_ui16_developer_patch_menus.domain();
      patchIcon('domain', 'concourse-domain-picker', items, callback);
    }
function patchDomainPickerIcon ( ) { function getDomainId ( ) { var sys_id = $ ( '#domain_picker_select' ) . val ( ) ; if ( sys_id ) { sys_id = sys_id . split ( ':' ) . pop ( ) ; } return sys_id ; } function callback ( invokedOn , selectedMenu ) { var domain_id = getDomainId ( ) , text = selectedMenu . text ( ) , item , i ; for ( i = 0 ; i < items . length ; i ++ ) { item = items [ i ] ; if ( item . name == text ) { executeMenuItem ( item , { domain_table : domain_table , domain_id : domain_id } ) ; return ; } } jslog ( 'Unknown item selected: "' + text + '"' ) ; } var domain_table = config . picker_icon . domain_table ; var items = snd_ui16_developer_patch_menus . domain ( ) ; patchIcon ( 'domain' , 'concourse-domain-picker' , items , callback ) ; }
Patch the Domain picker icon with a context menu.
Patch the Domain picker icon with a context menu .
// remove 'string:' prefix