Universal Rights Management system and third-party front-end control integration implementation of a variety of selection functions

Source: Internet
Author: User

Use the underlying code that uses the common rights management system in your project, while working with the front-end controls to implement multiple input selection functions:

1: The Direct input box is selected

Implement in the input characters automatically go back to the background to retrieve, the match is displayed in the drop-down box, the corresponding implementation code in the background:


2: Input box, pop-up window select person.

This function can be implemented when clicking the button on the right side of the input box pops up a window, click the row in the window will be a row corresponding to the item backfill into the input box, the implementation of the window is relatively simple, some difficulty when clicking the row of the event, the following is the JS code section.

Double-click event in pop-up window

        //Double-click the Top.frmright window to pass the value        functionondblclickrow (text, value) {vartxtID = $ ("#hiddenid"). Val (); varBtofrmright = $ ("#bTofrmright"). Val ();if(Btofrmright = = ' false ') {top.document.getElementById ("_dialogframe_sitescan"). Contentwindow. SetValue                (text, value, txtID); Top.                Dialog.close (); return; } Else if(Btofrmright = = ' Simple ') {                //top form is not in frametop. SetValue                (text, value, txtID); Top.                Dialog.close (); return; } Else {                //Refresh Data Relay                varTabfrmid = "Page_" +top.frmright.getCurrentTabId (); //Pass IDtop.frmright.document.getElementById (tabfrmid). Contentwindow. SetValue                (text, value, txtID); Top.            Dialog.close (); }                        }

Assign a value to a text box in the parent window:

                 function  setValue (text, value, id) {            //alert (Usesiteid + ":: : "+ value +" ID: "+ id");            $ ("#" + ID + ""). attr ("Reltext", text). attr ("Relvalue", Value). render ();         };


3: Input box, you can choose more than one person, pop up a small window selection.



Plug-ins that can implement multiple selection of drop-down boxes:

 <fieldset>         <legend>Basic multi-Select drop-down box (local data)</legend>           <Divclass= "Selecttree"ID= "SelectTree1"multimode= "true"Nogroup= "true"Data= ' {' treenodes ': [{"id": "1", "ParentID": "0", "Name": "Employee 1"},{"id": "2", "ParentID": "0", "Name": "Employee 2"},{"id": "3", "ParentID": "0", " Name ":" Employee 3 "},{" id ":" 4 "," ParentID ":" 0 "," Name ":" Employee 4 "}]} '></Div>        </fieldset>

The implementation of the above features, together with the use of common permissions system code is very easy to implement.

The b/S version of the Universal permission system will consider the use of third-party components to implement the permission entries, user management configuration and selection functions, please look forward to ~ ~, if there are suggestions, welcome message.

Universal Rights Management system and third-party front-end control integration implementation of a variety of selection functions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.