Tags

    Sortable: 59

    Sortable allows records to be sorted.

    Sortable( "dataFieldName" ; "sortFieldName" {; bgColor ; separatorColor; rowHeight ; advancedOptions } )


    Parameters

    1 dataFieldName The name of the FileMaker field containing the data to be displayed for sorting, in "TableOccurrence::FieldName" format. The data stored in this field may be simple values, or it may be HTML code designed to give a certain rendered appearance in the sorter.
    2 sortFieldName The name of a field that will be used to adjust the order of the records. After each time the user moves a record to a new position, this field will be re-serialised to set the desired order. Note that the new values will start from 1, 2, ... etc., and only records that were displayed in the sorter will be updated. Therefore multiple records in the table may have a sort value of (for example) "1", and so the sort value will only make sense in the context of the correct found/related set of records.
    3 bgColor
    (opt)
    Background color of the web viewer. Use any HTML-compatible color specification, .e.g. "green" or "#f2f3f4"
    4 separatorColor
    (opt)
    Color of the separator lines used between rows in a simple vertical sorter. Use any HTML-compatible color specification, .e.g. "green" or "#f2f3f4"
    5 rowHeight
    (opt)
    Height of each sortable element. Value should be a number, which will be interpreted as a height in pixels.
    6 advancedOptions
    (opt)
    Parameter allowing advanced usage, e.g. specifying CSS overrides and special jQuery UI options. See below for further info.


    Example:

    Advanced Options

    Advanced options can be passed to the BlackBox in the final optional parameter. Generally speaking, the use of advanced options requires a reasonable knowledge of CSS, JavaScript, and probably the behavior of the jQuery UI Sortable interaction module. If this is not you, stop reading now!


    The value of the AdvancedOptions parameter must be a JSON-formatted object (see? told you!) containing any or all of the advanced parameters listed below.


    Current advanced options are:

    • css
    • sortable_options
    • startup_code
    • before_list_html
    • after_list_html
    • start_of_list_html
    • end_of_list_html

    Note that in order to use the AdvancedOptions parameter, the bgColor and height positional parameters must be supplied. They can be given blank values, as in the examples below. If they do have values, these will be applied after the Advanced Options have been taken into account. e.g. if you specify a bgColor, it will be applied after any CSS overrides, and may supersede a background color supplied that way.


    AdvancedOption: CSS

    A block of CSS can be passed in order to extend and/or override the default CSS for the sorter (see below for the default CSS styles).

    Example: specify a different background color for the sorting boxes by overriding the default rule.


    Sortable( "Parameters::Name" ; "Parameters::sort_order" ; "" ; "" ; "" ; "{ css : '.ui-sortable li { background-color: lightblue; }' }" )


    AdvancedOption: sortable_options

    The jQuery UI sortable() method supports a number of optional parameters, some of which may be useful in advanced applications. These options can be supplied through the Sortable BlackBox's Advanced Options parameter by passing them as a quoted string named sortable_options.


    Example: by default the Sortable BlackBox restricts dragging to up and down by using the jQuery UI Sortable option axis: 'y'. You can override this by passing that option yourself. Specify 'x' for left and right, or false to allow dragging in both directions (note that 'x' or 'y' should be quoted, but false should not: it's a JavaScript boolean value.)

    Sortable( "Parameters::Name" ; "Parameters::sort_order" ; "" ; "" ; "" ; "{ sortable_options : 'axis : false' }" )


    Example with both css and sortable_options specified:

    Sortable( "Parameters::Name" ; "Parameters::sort_order" ; "" ; "" ; "" ; "{ css : '.ui-sortable li { background-color: lightblue; }', sortable_options : 'axis : false' }" )


    A complex example: css (sourced from a FileMaker field) and sortable_options are used to present a 2-dimensional sorter with rectangular gray boxes.

    Sortable( "Parameters::Name" ; "Parameters::sort_order" ; "" ; "" ; "" ; "{ css : '"& Settings::function_css &"', sortable_options: 'axis: false' }" )

    The field Settings::function_css contains the CSS below. One very important feature is the use of float: left; to cause the sorter to work in two dimensions instead of just up and down.

    .ui-sortable li {
    list-style-type: none;
    float: left;
    border: none;
    background-color: lightgray;
    margin: 3px;
    padding: 2px;
    width: 40px;
    }


    .ui-sortable li.ui-sortable-helper {
    border: none;
    background-color: lightgray;
    }
    .ui-sortable li.ui-sortable-placeholder {
    border: none;
    width: 40px;
    background-color: white;
    }

    NOTE: as well as option parameters, the jQuery UI Sortable interaction supports event and method parameters. Technically you can also use sortable_options to pass these through to the jQuery UI Sortable interaction, although this should be done with caution.

    An example of this approach is the BackBox Builder function parameter sorter: it uses the jQuery UI Sortable interaction's update method to hook in an inline JavaScript function that checks the placement of optional parameters after each re-ordering operation, and when it is done, it calls the Sortable BlackBox's built-in update function, UpdateAfterSorting(), to finish the job of updating the FileMaker record data.


    AdvancedOption: startup_code


    You can supply a piece of JavaScript code to be executed immediately after the Sortable BlackBox is initialised. (NB This is distinct from the 'start' event for the jQuery sortable interaction: that event only fires when the user starts dragging an object.)


    The JavaScript code should be supplied as a single-quoted string, which will be eval()ed after the list items have been loaded and set up in the web viewer.


    Example:

    Sortable( "Parameters::Name" ; "Parameters::sort_order" ; "" ; "" ; "" ; "{ startup_code: 'alert( \'It has begun!\' );' }" )


    AdvancedOption: HTML Snippets


    The following advanced options allow you to place snippets of HTML in useful spots within the sorter:

    • before_list_html
    • start_of_list_html
    • end_of_list_html
    • after_list_html

    The HTML element that becomes the sorter is a <ul> element. before_list_html and after_list_html allow you to place snippets before and after this element. start_of_list_html and end_of_list_html allow you to insert HTML elements that become, respectively, the first element inside the <ul>, and the last element before it closes.

    NOTE:The visual layout behaviour of after_list_html is somewhat unpredictable, probably due to the way it interacts with DOM manipulations performed by the jQuery UI Sortable interaction. Probably best to be avoided.

    Example: the BlackBox Builder uses a Sortable BlackBox that is customised in a number of ways for re-ordering function parameters. To display the name of the function (sourced from a FileMaker field), and also parentheses at either end of the parameter sorter, the following AdvancedOptions are used:

    "start_of_list_html: '<span style=\\\"float: left\\\">"& Functions::canonical_name &"(</span>', "&

    "end_of_list_html: '<span style=\\\"float: left\\\">)</span>', "&


    Note that these are <span> elements, not <li>. A sortable_option AdvancedOption ( items: 'li' ) is also used to specify that only <li> elements are draggable, so these markers keep their place at the start and end of the parameter list.


    Default CSS

    The default CSS used in the sortable BlackBox is shown below; this will help you decide what CSS settings to use if you are developing your own.

    Note the use of selective top and bottom borders in the various box, helper, and placeholder styles. These settings reproduce the appearance of a default FileMaker portal with a single-pixel line between rows.


    html,  body,  ul,  li  {  border:  0;  margin:  0;  padding:  0;  }
    html, body {
    overflow:  hidden;
    background: white;
    }


    #sortable_list  {
    width: 100%; height: 100%; 
    position: absolute; 
    overflow: auto; 
    border: 0;
    }
    /* Default styles, which reproduce the appearance of a FileMaker portal with default font settings. */


    .ui-sortable li  {
    line-height: 14px;
    padding-top: 0px;
    padding-bottom: 2px;
    padding-left: 1px;
    border-bottom: 1px solid black;
    font-family: Helvetica; font-size: 11px; color: black;
    white-space:nowrap;
    background-color: white;
    list-style: none;
    }


    .ui-sortable li.ui-sortable-helper {
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    background: rgba(255,255,255,.9); 
    color: rgba(68,68,68,.5);
    } 


    ui-sortable li.ui-sortable-placeholder {
    border-bottom: 1px solid black; 
    height: 14px;
    background-color: #eee;
    }

    Comments

    /groups/docs/search/index.rss?sort=modifiedDate&sortDirection=reverse&tag=blackboxlist/groups/docs/search/?sort=modifiedDate&sortDirection=reverse&tag=blackboxBlackBox ControlsCustomTagSidebarCustomTagSidebar?sort=modifiedDate&sortDirection=reverse&tag=blackbox0/groups/docs/sidebar/CustomTagSidebarmodifiedDate5CustomTagSidebarreverseblackboxBlackBox Controlscustom/groups/docs/search/index.rss?tag=hotlist/groups/docs/search/?tag=hotWhat’s HotHotListHot!?tag=hot9/groups/docs/sidebar/HotListwendyWendy Wethey2012-04-24 00:32:22+00:002012-04-24 00:32:22updated16wendyWendy Wethey2012-04-24 00:19:34+00:002012-04-24 00:19:34updated15wendyWendy Wethey2012-03-22 22:16:33+00:002012-03-22 22:16:33updated14wendyWendy Wethey2012-03-22 22:10:41+00:002012-03-22 22:10:41updated13Added anchors for lite and advanced.samSam Sehnert2012-01-15 23:18:07+00:002012-01-15 23:18:07updated12wendyWendy Wethey2011-10-03 21:53:23+00:002011-10-03 21:53:23updated11wendyWendy Wethey2011-09-01 22:58:47+00:002011-09-01 22:58:47updated10wendyWendy Wethey2011-09-01 22:53:29+00:002011-09-01 22:53:29updated9samSam Sehnert2011-06-30 07:02:03+00:002011-06-30 07:02:03updated8samSam Sehnert2011-06-30 06:52:51+00:002011-06-30 06:52:51updated7samSam Sehnert2011-06-30 05:25:13+00:002011-06-30 05:25:13updated6Added links through to lite blackbox pages.samSam Sehnert2011-06-30 04:49:43+00:002011-06-30 04:49:43updated5Added quick descriptions, but still need to link through to pages.samSam Sehnert2011-06-30 02:23:37+00:002011-06-30 02:23:37updated4Added tag - blackbox managementsamSam Sehnert2011-06-30 01:33:31+00:002011-06-30 01:33:31addTag3Added tag - hotsamSam Sehnert2011-06-30 01:33:26+00:002011-06-30 01:33:26addTag2First createdsamSam Sehnert2011-06-30 00:37:46+00:002011-06-30 00:37:46created1wiki2012-04-24T00:32:22+00:00groups/docs/wiki/5f2d4FalseBuilt in BlackBoxes/groups/docs/wiki/5f2d4/Built_in_BlackBoxes.htmlWendy Wethey16 updatesBuilt in BlackBoxes Reactor comes bundled with two types of BlackBoxes: those that are available with the free version of Reactor, and those that are available only ...Falsewendy2012-04-24T00:32:22+00:00wendyWendy Wethey2012-03-22 23:07:53+00:002012-03-22 23:07:53updated28wendyWendy Wethey2012-03-22 21:47:41+00:002012-03-22 21:47:41updated27wendyWendy Wethey2012-03-22 21:46:49+00:002012-03-22 21:46:49updated26wendyWendy Wethey2012-03-22 20:16:45+00:002012-03-22 20:16:45updated25wendyWendy Wethey2012-03-22 20:05:49+00:002012-03-22 20:05:49updated24wendyWendy Wethey2012-03-22 20:05:08+00:002012-03-22 20:05:08updated23wendyWendy Wethey2012-03-22 20:02:54+00:002012-03-22 20:02:54updated22added applying anchorsamSam Sehnert2012-01-16 00:08:46+00:002012-01-16 00:08:46updated21samSam Sehnert2012-01-16 00:08:16+00:002012-01-16 00:08:16updated20punctuationsamSam Sehnert2012-01-16 00:05:18+00:002012-01-16 00:05:18updated19Updated imagesamSam Sehnert2012-01-16 00:04:31+00:002012-01-16 00:04:31updated18samSam Sehnert2012-01-16 00:03:01+00:002012-01-16 00:03:01updated17samSam Sehnert2012-01-16 00:02:18+00:002012-01-16 00:02:18updated16Refined instructionssamSam Sehnert2012-01-15 23:14:10+00:002012-01-15 23:14:10updated15Added tag - troubleshootingsamSam Sehnert2011-06-27 02:23:28+00:002011-06-27 02:23:28addTag14Removed tag - blackbox managementsamSam Sehnert2011-06-27 02:23:25+00:002011-06-27 02:23:25removeTag13Added tag - blackbox managementsamSam Sehnert2011-06-27 02:23:24+00:002011-06-27 02:23:24addTag12Removed tag - debugsamSam Sehnert2011-06-27 02:23:23+00:002011-06-27 02:23:23removeTag11Added tag - customizationsamSam Sehnert2011-06-27 01:40:54+00:002011-06-27 01:40:54addTag10samSam Sehnert2010-09-30 23:27:31+00:002010-09-30 23:27:31updated9Added tag - hotsamSam Sehnert2010-08-16 05:12:06+00:002010-08-16 05:12:06addTag8Removed tag - advancedsamSam Sehnert2010-08-16 05:12:03+00:002010-08-16 05:12:03removeTag7Added tag - advancedsamSam Sehnert2010-08-16 05:12:01+00:002010-08-16 05:12:01addTag6samSam Sehnert2010-08-16 03:54:43+00:002010-08-16 03:54:43updated5Added tag - debugsamSam Sehnert2010-08-08 22:32:01+00:002010-08-08 22:32:01addTag4Added tag - overridesamSam Sehnert2010-08-08 22:31:54+00:002010-08-08 22:31:54addTag3Added override manager description.samSam Sehnert2010-08-08 22:30:38+00:002010-08-08 22:30:38updated2First additionsamSam Sehnert2010-08-08 22:15:13+00:002010-08-08 22:15:13created1wiki2012-03-22T23:07:54+00:00groups/docs/wiki/f072fFalseOverride Inspector/groups/docs/wiki/f072f/Override_Inspector.htmlWendy Wethey28 updatesOverride Inspector The Override Inspector is a useful tool available in all BlackBoxes which support overrides. It will list all available overrides, and help yo...Falsewendy2012-03-22T23:07:54+00:00removed beta message.samSam Sehnert2010-02-02 10:06:44+00:002010-02-02 10:06:44updated46Added tag - gantt chartwendyWendy Wethey2009-12-01 01:31:38+00:002009-12-01 01:31:38addTag45Removed tag - unfinishedwendyWendy Wethey2009-12-01 01:31:29+00:002009-12-01 01:31:29removeTag44wendyWendy Wethey2009-12-01 01:02:43+00:002009-12-01 01:02:43updated43wendyWendy Wethey2009-12-01 01:01:07+00:002009-12-01 01:01:07updated42wendyWendy Wethey2009-12-01 00:58:30+00:002009-12-01 00:58:30updated41wendyWendy Wethey2009-11-30 23:26:36+00:002009-11-30 23:26:36updated40wendyWendy Wethey2009-11-30 23:25:37+00:002009-11-30 23:25:37updated39wendyWendy Wethey2009-11-30 23:06:25+00:002009-11-30 23:06:25updated38wendyWendy Wethey2009-11-30 23:06:05+00:002009-11-30 23:06:05updated37wendyWendy Wethey2009-11-30 23:04:55+00:002009-11-30 23:04:55updated36wendyWendy Wethey2009-11-30 23:03:12+00:002009-11-30 23:03:12updated35wendyWendy Wethey2009-11-30 23:02:09+00:002009-11-30 23:02:09updated34wendyWendy Wethey2009-11-30 23:01:36+00:002009-11-30 23:01:36updated33wendyWendy Wethey2009-11-30 23:00:25+00:002009-11-30 23:00:25updated32added filter field name note.samSam Sehnert2009-11-30 02:34:32+00:002009-11-30 02:34:32updated31wendyWendy Wethey2009-11-24 01:49:03+00:002009-11-24 01:49:03updated30wendyWendy Wethey2009-11-24 01:30:28+00:002009-11-24 01:30:28updated29wendyWendy Wethey2009-11-24 01:29:47+00:002009-11-24 01:29:47updated28wendyWendy Wethey2009-11-24 01:15:57+00:002009-11-24 01:15:57updated27wendyWendy Wethey2009-10-27 04:03:11+00:002009-10-27 04:03:11updated26wendyWendy Wethey2009-10-27 03:40:10+00:002009-10-27 03:40:10updated25wendyWendy Wethey2009-10-27 03:18:03+00:002009-10-27 03:18:03updated24Final Beta notessamSam Sehnert2009-10-15 21:34:58+00:002009-10-15 21:34:58updated23craigCraig Saunders2009-10-14 09:13:14+00:002009-10-14 09:13:14updated22samSam Sehnert2009-09-15 01:57:58+00:002009-09-15 01:57:58updated21samSam Sehnert2009-09-15 01:56:58+00:002009-09-15 01:56:58updated20samSam Sehnert2009-09-15 01:56:21+00:002009-09-15 01:56:21updated19Added tag - unfinishedsamSam Sehnert2009-09-15 01:56:15+00:002009-09-15 01:56:15addTag18samSam Sehnert2009-09-15 01:44:00+00:002009-09-15 01:44:00updated17Added tag - betasamSam Sehnert2009-09-09 00:44:10+00:002009-09-09 00:44:10addTag16samSam Sehnert2009-09-09 00:44:01+00:002009-09-09 00:44:01updated15craigCraig Saunders2009-09-04 09:52:55+00:002009-09-04 09:52:55updated14added beta notessamSam Sehnert2009-09-04 04:21:58+00:002009-09-04 04:21:58updated13Added tag - extendedwendyWendy Wethey2009-09-04 04:19:53+00:002009-09-04 04:19:53addTag12Added tag - blackboxwendyWendy Wethey2009-09-04 04:19:27+00:002009-09-04 04:19:27addTag11wendyWendy Wethey2009-09-04 04:15:08+00:002009-09-04 04:15:08updated10wendyWendy Wethey2009-09-04 04:10:54+00:002009-09-04 04:10:54updated9wendyWendy Wethey2009-09-04 04:07:22+00:002009-09-04 04:07:22updated8wendyWendy Wethey2009-09-04 04:02:54+00:002009-09-04 04:02:54updated7wendyWendy Wethey2009-09-04 03:59:54+00:002009-09-04 03:59:54updated6wendyWendy Wethey2009-09-04 03:56:55+00:002009-09-04 03:56:55updated5wendyWendy Wethey2009-09-04 03:53:54+00:002009-09-04 03:53:54updated4wendyWendy Wethey2009-09-04 03:50:54+00:002009-09-04 03:50:54updated3wendyWendy Wethey2009-09-04 03:48:53+00:002009-09-04 03:48:53updated2First additionwendyWendy Wethey2009-09-04 03:45:53+00:002009-09-04 03:45:53created1wiki2012-03-22T22:06:10+00:00groups/docs/wiki/9c8ccFalseGanttChartPro/groups/docs/wiki/9c8cc/GanttChartPro.htmlWendy Wethey46 updatesGanttChartPro GanttChartPro is a complete overhaul of the GanttChartLite. It enables tasks to be viewed from a resource (e.g. person, room) pers...Falsewendy2012-03-22T22:06:10+00:00added a to version number for consistency.samSam Sehnert2012-01-16 00:15:15+00:002012-01-16 00:15:15updated11wendyWendy Wethey2012-01-12 22:05:22+00:002012-01-12 22:05:22updated10wendyWendy Wethey2012-01-12 20:40:54+00:002012-01-12 20:40:54updated9wendyWendy Wethey2012-01-12 20:00:23+00:002012-01-12 20:00:23updated8wendyWendy Wethey2012-01-12 20:00:04+00:002012-01-12 20:00:04updated7craigCraig Saunders2012-01-11 09:24:57+00:002012-01-11 09:24:57updated6Added tag - release notescraigCraig Saunders2012-01-11 09:24:50+00:002012-01-11 09:24:50addTag5Removed tag - delcraigCraig Saunders2012-01-11 09:24:47+00:002012-01-11 09:24:47removeTag4Added tag - delcraigCraig Saunders2012-01-11 09:24:40+00:002012-01-11 09:24:40addTag3Added tag - hotcraigCraig Saunders2012-01-11 09:24:33+00:002012-01-11 09:24:33addTag2First createdcraigCraig Saunders2012-01-11 09:16:25+00:002012-01-11 09:16:25created1wiki2012-01-16T00:15:15+00:00groups/docs/wiki/d40e1FalseRelease Notes for v3.5.8a/groups/docs/wiki/d40e1/Release_Notes_for_v358a.htmlSam Sehnert11 updatesRelease Notes for v3.5.8a Reactor v3.5.8a incorporates a bunch of tweaks and fixes along with a couple of new features. The installer for Mac OS X Lion now works under non...Falsesam2012-01-16T00:15:15+00:00Added Norwegian creditssamSam Sehnert2011-12-20 21:14:49+00:002011-12-20 21:14:49updated14Added tag - overridesamSam Sehnert2011-06-27 02:12:40+00:002011-06-27 02:12:40addTag13Added german to creditssamSam Sehnert2011-04-19 22:00:52+00:002011-04-19 22:00:52updated12Added italian localization creditssamSam Sehnert2011-04-17 22:59:47+00:002011-04-17 22:59:47updated11samSam Sehnert2011-04-15 08:30:13+00:002011-04-15 08:30:13updated10samSam Sehnert2011-04-15 08:29:54+00:002011-04-15 08:29:54updated9fix typo in sp of SwedishcraigCraig Saunders2011-04-15 02:19:30+00:002011-04-15 02:19:30updated8samSam Sehnert2011-04-15 00:44:15+00:002011-04-15 00:44:15updated7Added first documentationsamSam Sehnert2011-04-15 00:43:32+00:002011-04-15 00:43:32updated6Added tag - customizationsamSam Sehnert2011-04-15 00:09:51+00:002011-04-15 00:09:51addTag5Added tag - languagesamSam Sehnert2011-04-15 00:09:41+00:002011-04-15 00:09:41addTag4Added tag - localizationsamSam Sehnert2011-04-15 00:09:39+00:002011-04-15 00:09:39addTag3Added tag - hotsamSam Sehnert2011-04-15 00:09:31+00:002011-04-15 00:09:31addTag2First createdsamSam Sehnert2011-04-15 00:05:20+00:002011-04-15 00:05:20created1wiki2011-12-20T21:14:49+00:00groups/docs/wiki/088b5FalseBlackBox Localization/groups/docs/wiki/088b5/BlackBox_Localization.htmlSam Sehnert14 updatesBlackBox Localization We've developed a standard localization file for use with our BlackBoxes, which covers the most commonly used error messages, labels and date for...Falsesam2011-12-20T21:14:49+00:00hot/groups/docs/search/index.rss?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomelist/groups/docs/search/?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomeRecent ChangesRecentChangesListUpdates?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcome0/groups/docs/sidebar/RecentChangesListmodifiedDateallRecent ChangesRecentChangesListUpdateswiki/welcomeNo recent changes.reverse5search