Giter Site home page Giter Site logo

highq-collaborate's Introduction

HighQ-Collaborate

Customisations for HighQ Collaborate product

This javascript library is intended to help others with functionality related to the HighQ Collaborate SaaS platform.


NOTE: This library is now deprecated due to changes in the Collaborate dashboard architecture and technologies used (5.x onwards).


ClientCustomisations

This is a library that includes a set of helper functions when creating Home page dashboards for a site.

Installation

Before you go any further, if you haven't already, you will need to raise a support call with your HighQ Support team to ask them for the following request:

- Please enable Javascript within Rich-text pages for my Collaborate instance

See https://kb-collaborate.highq.com/advanced-tip_-displaying-external-content-in-rich-text-pages for more details (scroll down to the "Javascript" heading). Once you get the response back from HighQ indicating this feature has been enabled, step through the list below to include the library into your instance.

  1. Go to the dist folder and download the latest version of the script file:

    • current version (This will load the script into a new window. Click right mouse and select "Save as" from the menu.)
  2. Go to the System Admin section in your Collaborate instance, and select File Library from the left hand side menu

  3. Click the Add new file button and upload the script file to your library

  4. Once uploaded, hover over the file name of your newly uploaded file (in the table displayed) and click the right mouse to bring up the browser context menu.

    • select the option to copy the link to the clipboard (Copy link address in Chrome, or Copy shortcut in IE11)

    Screenshot

  5. Now edit your sites Home page dashboard and click the Source button in the toolbar that is displayed.

    Screenshot

  6. Add the following tags into the Source window:

        <script type="text/javascript" src="(paste in the link you copied in step 4)"></script>

    so for the example from the image link in step 4, we'd see something like:

        <script type="text/javascript" src="https://myinstance.highq.com/myinstance/flag/flag_9999.action?timestamp=20171017082158"></script>

    This will include the script for you to use it's features.

    • Now add another script tag where you will write the script of what you want to achieve, e.g.
    <script type="text/javascript">
        ClientCustomisations.forPeopleList("My List").using("email").reorderBy([
            "[email protected]",
            "[email protected]",
            "[email protected]"        
        ]);
    </script>

    The list of users should be separated by a comma (,) and surrounded by double quotes (")

  7. Click the OK (green button) to save your changes, and click the tickbox to save the Home page back to Collaborate.

  8. ๐Ÿ‘ That's it, click on the Home page link in the top main navigation and you should see the reordered list.


Methods


forPeopleList

This is for use when you have People List's in your home page dashboard and you want to apply manual ordering. Currently Collaborate only support displaying the generated list in alphabetical order.

Usage
ClientCustomisations.forPeopleList(@list_title).using(@identifier).reorderBy(@user_list);

Where

  • @list_title: Is the title of your people list (string) OR can be the Id (integer) of your People List macro.
  • @identifier: is how you will identify the users in the next parameter. Options are
    • "name": The list contains the user's name.
    • "email": The list contains the user's email.
    • "userid": The list contains the user's system ID.
  • @user_list: An array users in the order with which you want them displayed atop of the People List.
Examples of usage

If you had a People's list with the title "Business Development", and you wanted two senior staff (David Jones, Julia Smith) to be at the top of the list then you would include the script:

ClientCustomisations.forPeopleList("Business Development").using("name").reorderBy([ 
   "David Jones", "Julia Smith" 
]);

Or, if you want to use their email addresses:

ClientCustomisations.forPeopleList("Business Development").using("email").reorderBy([ 
   "[email protected]", "[email protected]" 
]);

This essentially promotes those people to the top of the list (in the order you specified). If you have more than one list in the Home page, you just duplicate the script changing the People list title, and people you want promoted, e.g.

ClientCustomisations.forPeopleList("Business Development").using("email").reorderBy([ 
   "[email protected]", "[email protected]" 
]); 
ClientCustomisations.forPeopleList("My Other List").using("email").reorderBy([ 
   "[email protected]", "[email protected]", "[email protected]", "[email protected]" 
]);

Or you can chain them together, e.g.

ClientCustomisations
    .forPeopleList("Business Development").using("email").reorderBy([ 
        "[email protected]",
        "[email protected]" 
    ])
    .forPeopleList("My Spy List").using("email").reorderBy([ 
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]" 
    ]);

There is no difference between the two approaches above, it's whichever reads clearer for you.

If you know the Id of the People List, you can use this instead of the list title, e.g. If my (macro) id is 131:

ClientCustomisations.forPeopleList(131).using("name").reorderBy([ 
   "David Jones", "Julia Smith" 
]);

TIP: How do you find out the Id?

...TODO... 

getFavouriteFilesList

This will allow you to display a list of the user's Favourite Files in the Home page dashboard, for either the current site, or a provided site Id.

Usage
ClientCustomisations.getFavouriteFilesList().forSite(@siteId).placeInto(@location);

Where

  • @siteId: This is optional. If you do not supply a site Id, then all favourites will be displayed regardless of which site they are from. If you supply a site Id, then only favourite documents from that site will be displayed.
  • @location: This is the location of where you want the list to be displayed and can be the Id of the element you want the list to appear in, or it can be a jQuery selector string, or it can be the jQuery selected object itself (see examples).
Examples of usage

If you want the users favourite documents from all sites, and placed into the element with id "myList"

see w3schools.com for what or how to use "id"

ClientCustomisations.getFavouriteFilesList().forSite().placeInto("myList");

If you want the users favourite documents from just site #42, and placed into the element with id "myList"

ClientCustomisations.getFavouriteFilesList().forSite(42).placeInto("myList");

If you want the users favourite documents from just site #42, and placed into the element found at "#dashboard div.listContainer"

ClientCustomisations.getFavouriteFilesList().forSite(42).placeInto("#dashboard div.listContainer");

If you want the users favourite documents from just site #42, and placed into this element

var $element = $j("#myList");
ClientCustomisations.getFavouriteFilesList().forSite(42).placeInto($element);

highq-collaborate's People

Contributors

manemal avatar

Stargazers

Konstantinos Georgiadis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.