Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Fixes for issues - #94 #95 #92 and made path to multiselect.tmpl.html relative #96

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

NithinBiliya
Copy link

@NithinBiliya NithinBiliya commented Nov 22, 2016

File changed - multiselect.js

Fix for issues -

  1. single select - button text is not mapped correctly to the string modal value single select - button text is not mapped correctly to the string modal value #95
  2. single select - button text is not mapped correctly to the model value single select - button text is not mapped correctly to the model value #94
  3. Show only one property but select complete object Show only one property but select complete object #92
  4. Made the path to multiselect.tmpl.html relative to multiselect.js in file multiselect.js. - Solution from -- http://stackoverflow.com/a/21103831/1298824

Changes made -

  1. Added a new function - getItemLabel(items,model)

  2. Calling the above function in function getHeaderText()

  3. get the currentScriptPath
    // getting the path of the multiselect.js file
    var scripts = document.getElementsByTagName("script")
    var currentScriptPath = scripts[scripts.length-1].src;

  4. Used the currentScriptPath as below -
    templateUrl: function (element, attr) {
    // multiselect.tmpl.html path relative to multiselect.js
    return attr.templateUrl || currentScriptPath.substring(0, currentScriptPath.lastIndexOf('/') + 1)
    + 'multiselect.tmpl.html';
    },

Plnkr link after fixes - link3

NithinBiliya added 3 commits November 22, 2016 22:52
…o the model value amitava82#94

Possible fix for issue - Show only one property but select complete object amitava82#92

File changed - multiselect.js

Changes made -
Added a new function - getItemLabel(items,model)
Calling the above function in function getHeaderText()
…o the string modal value amitava82#95

Possible fix for issue - Show only one property but select complete object amitava82#92

File changed - multiselect.js

Changes made -
Calling the function getItemLabel(items,model) in function getHeaderText()
…file multiselect.js.

Changes made --

// getting the path of the multiselect.js file
var scripts = document.getElementsByTagName("script")
var currentScriptPath = scripts[scripts.length-1].src;

Used the currentScriptPath ass below -
        templateUrl: function (element, attr) {
          // multiselect.tmpl.html path relative to multiselect.js
            return attr.templateUrl || currentScriptPath.substring(0, currentScriptPath.lastIndexOf('/') + 1)
        + 'multiselect.tmpl.html';
        },

Solution from -- http://stackoverflow.com/a/21103831/1298824

Plnkr example -- http://plnkr.co/edit/kQ8Uz6uztzBeo8DvlpO9?p=preview
@NithinBiliya NithinBiliya changed the title Fixes for issues - #94 #95 #92 Fixes for issues - #94 #95 #92 and made path to multiselect.tmpl.html relative Nov 23, 2016
@amitava82
Copy link
Owner

Thanks! Can you update the readme, github pages with new changes?

@NithinBiliya
Copy link
Author

Looks like last few pulls were into master branch. gh-pages branch is not in sync with the master. Its missing few updates.

NithinBiliya added 20 commits November 28, 2016 13:32
…its usage.

Usage -
add option 'hover="true"' in the am-multiselect tag. This will show the button header text as the hover text when you hover over the button.

This is useful when the button length is fixed and the header text overfows the button size.

Plnkr demo link - http://plnkr.co/edit/yKy9kNF9dXsnHXzHSTJB?p=preview
…eed to uncheck all items and clear searchText.label

Added code to uncheck and clear the label value in the modelValue watch.
need to uncheck from the entire list of items. If user filers with ine text and selects item A. Next time user fileters and selects item B (item A now not in the filtered set). The item A will not get unchecked
… instead of true to setModelValue. Since different values geeting set when single and multiple
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants