Roxen.git / server / modules / tags / configtablist.pike

version» Context lines:

Roxen.git/server/modules/tags/configtablist.pike:1:   /* -  * $Id: configtablist.pike,v 1.4 1997/09/03 07:53:37 grubba Exp $ +  * $Id: configtablist.pike,v 1.5 1997/09/04 12:40:59 grubba Exp $    *    * Makes a tab-list like the one in the config-interface.    *    * $Author: grubba $    */    - constant cvs_version="$Id: configtablist.pike,v 1.4 1997/09/03 07:53:37 grubba Exp $"; + constant cvs_version="$Id: configtablist.pike,v 1.5 1997/09/04 12:40:59 grubba Exp $";   constant thread_safe=1;      #include <module.h>   inherit "module";   inherit "roxenlib";      /*    * Functions    */   
Roxen.git/server/modules/tags/configtablist.pike:48:   string tag_config_tab(string t, mapping a, string contents)   {    string dir = "u/";    mapping img_attrs = ([]);    if (a->selected) {    dir = "s/";    }    m_delete(a, "selected");       img_attrs->src = QUERY(location) + dir + -  replace(http_encode_string(contents), "?", "%3f"); +  replace(http_encode_string(contents), "?", "%3f") + ".gif";    if (a->alt) {    img_attrs->alt = a->alt;    m_delete(a, "alt");    } else {    img_attrs->alt = "_/" + html_encode_string(contents) + "\\_";    }    if (a->border) {    img_attrs->border = a->border;    m_delete(a, "border");    } else {
Roxen.git/server/modules/tags/configtablist.pike:82:   {    return ([ "config_tablist":tag_config_tablist ]);   }      mapping find_file(string f, object id)   {    array(string) arr = f/"/";    if (sizeof(arr) > 1) {    object interface = roxen->configuration_interface();    object(Image.image) button; +  +  if (arr[-1][sizeof(arr[-1])-4..] == ".gif") { +  arr[-1] = arr[-1][..sizeof(arr[-1])-5]; +  } +     switch (arr[0]) {    case "s": /* Selected */    button = interface->draw_selected_button(arr[1..]*"/",    interface->button_font);    break;    case "u": /* Unselected */    button = interface->draw_unselected_button(arr[1..]*"/",    interface->button_font);    break;    default:    return 0;    }    return http_string_answer(button->togif(), "image/gif");    }    return 0;   }