Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Buttonlist Pressed vs disabled CSS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Buttonlist Pressed vs disabled CSS

    I have buttonlist in a list detail view inside absolute layout container. I have an enable expression on the buttonlist to disable conditionally. Is there a way to visually display which button is pressed while disabled?
    Is there some an order of precedence or hierarchy that can be altered?


    Thanks
    John H

    #2
    Re: Buttonlist Pressed vs disabled CSS

    The A5 JS library code (Ver 12.4.5.1 Build 4642) has no provision for providing another "state" for a buttonList to visually indicate it is "selected" BUT "disabled" at the same time. In the A5 JS library code search for the object assignment "A5.buttonLists = {" In that object, find the function named 'html' and look at the code near the end of it that looks like the following:

    Code:
                    state = '';
                    if (vals.indexOf(bs.value) != -1)
                        state = 'pressed';
                    if (bs.disabled)
                        state = 'disabled';
    Notice how it checks for 'bs.disabled' after checking to see if the button is selected ('pressed') and overwrites the 'state' variable with 'disabled'. There would need to be a fourth state to indicate pressed and disabled. But, the button would also need two more properties, something like: 1) pressedDisabledClassName, and 2) pressedDisabledIcon. There are several places in the library functions that would need changing. Another, option would be to dynamically change the value in the 'disabledClassName' property for each button based upon if the button is selected or not. You could use the default class name when the button is disabled and not selected. But, when the button is disabled AND selected you would have another CSS class to visually indicate the button is selected, but disabled. You would have to put in your own code to switch the class name as needed and to redraw the buttonList when needed. You could also do the same for the 'disabledIcon' property of each button in the buttonlist, if you are using icons.

    An easier solution would be to create a second, simpler, control for displaying the data when the buttonList is supposed to be disabled. Hide the buttonList when you don't want to allow changes and instead show the other, view-only, control. As the value of the buttonList is changed via the 'onClick' event, you would want to keep the other view-only control updated.

    Comment


      #3
      Re: Buttonlist Pressed vs disabled CSS

      Rich,
      Thank you for the detailed reply. I'm looking into each of your ideas. Forgive me but where would I find the a5 JS Library?
      Thanks John H

      Comment


        #4
        Re: Buttonlist Pressed vs disabled CSS

        Run your app in Chrome. Press
        Code:
        Ctrl-Shift-i
        to open Chrome's Developer Tools window. On Developer Toosl menu bar, across the top, click "Sources", if it is not already the active window. Below that bar you will get a list of various a5w and js files. Look for a file name that begins with "a5-" and is followed by 8 digit number. That number is made up of the AA Build number you are on plus another four digit number. If you do not see that file name, click the ">>" to the right of file the file names to open a dropdown with all the open a5w and js files. With that file being displayed, click the "{ }" symbols at the bottom left corner of that window to format the js into something readable. Go to the top of that file and type ctrl-f to open the "find" box. Type the following:

        a5.buttonLists =

        Comment


          #5
          Re: Buttonlist Pressed vs disabled CSS

          I do find it interesting, and insightful, to look into Alpha code... but I find you can't base any kind of dependence on it from release to release. The current release section for that code is the following... you can see how's it's changed.

          Code:
                        if (bs.disabled || s.disabled) {
                              if (state == 'selected')
                                  state = 'disabled-selected';
                              else
                                  state = 'disabled';
                          }
          And then there is other code which applies a disabled selected class... but the end result is the same as other releases. In the end, you don't really know what you're dealing with... or could depend on it for very long before a change might break your code.

          You can do something to supplement whatever it is that Alpha is doing.

          I don't know how this will be affected by your container... you'd have to post a sample to test with. And... you don't mention which version of Alpha you're working with or how your ButtonList Control is being disabled. However, this process works if you know which button in the list has been selected... and how you disabled the Button List.

          Based your ButtonList Client Side Enable expression on a Javascript function. E.g. mine is set to

          Code:
          btnListDisabledCheck(txtDisableButtonList)
          Here I'm calling a function named btnListDisabledCheck and passing in a control I have named txtDisableButtonList.

          The function is...

          Code:
          function btnListDisabledCheck(txtDisableButtonList){
          
          	if(txtDisableButtonList != 0){
          		setTimeout(function(){
          			var btnList = $('{dialog.ComponentName}.V.R1.BTNLISTDISABLED.CONTROL.2');
          			btnList.className += btnList.className ? ' buttonPressed' : 'buttonPressed';
          		},50);
          		return false;
          	}else{
          		return true;
          	}
          
          }
          Just for this test, I'm evaluating the control I passed in... if it's not equal to zero then I want the ButtonList Control disabled... but I am adding the Class Name 'buttonPressed' to whatever Classes are already in the 3rd button.

          Each button in the list has it's own ID... therefore you can get at it.

          You can add whatever Class you want... including any you create yourself... it doesn't have to be Alpha's buttonPressed Class

          Comment


            #6
            Re: Buttonlist Pressed vs disabled CSS

            David,
            What is the build # for the JS Library you looked at?

            Comment


              #7
              Re: Buttonlist Pressed vs disabled CSS

              It's the current pre-release... 4786_5022

              Comment


                #8
                Re: Buttonlist Pressed vs disabled CSS

                Hum, so Alpha's working on the ButtonList. That is good news. I see in pre-release 4786, that David mentioned, the ButtonList builder does not yet have a place for recording the CSS class name and icon to be used when the button is pressed (selected) and disabled at the same time. Don't know if they will put those two properties into the builder, though. There are a lot of things (properties and events) that the buttonList has that are not exposed by the builder. I am really hopeful they will expose more of the events. In particular I'd like to see the ButtonList's 'refresh' event exposed with places for us to inject js code before and after that event.

                Comment

                Working...
                X