Changeset 16045


Ignore:
Timestamp:
2008-06-18T14:28:35+12:00 (16 years ago)
Author:
mdewsnip
Message:

(Adding dynamic classifiers) Now generates the correct links for dynamic classifier grouping nodes, and highlights the selected node correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/recpt/hlistbrowserclass.cpp

    r16044 r16045  
    2727#include "OIDtools.h"
    2828#include "recptprototools.h"
     29#include "cgiutils.h"
     30
    2931
    3032hlistbrowserclass::hlistbrowserclass () {
     
    144146
    145147    bool highlight = false;
    146     if ((*tsibling).OID == args["cl"] || is_child_of ((*tsibling).OID, args["cl"]))
     148    if ((*tsibling).OID == args["cl"] || is_child_of ((*tsibling).OID, args["cl"]) ||
     149    (*tsibling).OID == args["dcn"] || is_child_of ((*tsibling).OID, args["dcn"]))
    147150    {
    148151      link.clear();
     
    188191  if (doctype == "classify")
    189192  {
    190     link += "&cl=" + section.OID + "\">";
     193    // Dynamic classifier nodes
     194    if (args["a"] == "dc")
     195    {
     196      // The node label is going into the URL, so make it CGI-safe
     197      text_t classifier_node_dcn_cgi_safe = cgi_safe_utf8(section.OID);
     198      link = "<a href=\"_gwcgi_?c=" + args["c"] + "&amp;a=dc&amp;dcl=" + args["dcl"] + "&amp;dcn=" + classifier_node_dcn_cgi_safe + "\">";
     199    }
     200    // Static classifier nodes
     201    else
     202    {
     203      link += "&amp;cl=" + section.OID + "\">";
     204    }
    191205  }
    192206  else
Note: See TracChangeset for help on using the changeset viewer.