Access to built-in icons for Menu Items? - google-mirror-api

I know you can use iconUrl to customize icon for custom menu items but is there a way to access built-in icons such as checkbox that you see during confirmation for REPLY?

No. There's currently no way override this part of the interface, but it is something that could potentially be added to the API.
You may want to file an enhancement request in the Glass API issue tracker. IF you do, please include your intended use case.

Related

Correct way to add custom buttons with OpenTok

I'm building a video application for the web in React using OpenTok. OpenTok has built in buttons for muting the mic for the publisher and muting the audio for subscribers. In my case I also need buttons to mute the video for both the publisher and the subscriber.
I haven't seen anything about a mute video button in the documentation so I built the functionality myself using subscribeToVideo. The problem is that I want to add a button with this functionality next to the mute audio button, but I haven't found anything about custom buttons in the documentation.
So my question is: What's the best way to add custom buttons to OpenToks bar?
Of course I could append a button to the html and style it in place myself, but it feels ugly and I don't know what the consequences are. I guess this is my back up solution if there isn't any other way.
I will probably need to add other buttons as well in the future so I really hope OpenTok supports custom buttons and that it's just me that haven't found how to do it.
TokBox Developer Evangelist here.
We don't have any documentation on custom buttons, but you do have three options for the video and mute buttons on the video element.
If you want a custom button, you will have to append that to the HTML and toggle subscribeToVideo and subscribeToAudio properties like you said.
Here is a react sample that adds a mute video button https://opentok.github.io/opentok-web-samples/React-Basic-Video-Chat/
I would recommend that you just set the buttonDisplayMode to off and then recreate the mute audio button just using subscriber.subscribeToAudio() and publisher.publishAudio(). This way if eg. the opentok UI changes slightly it doesn't matter for you, plus you can make it all look however you want.

Globally disable click out side of ionicModal

ionicModal is appearing like a popup along with backdrop in iPad (Fine in android tabs with full screen view). Modal is closing whenever user clicks on backdrop. It will be an issue if user is filling a form.
Yes, I can use backdropClickToClose: false property while creating modal but I used over 60 modals all over my app. Is there any way to set backdropClickToClose:false globally in a config like
$ionicModal.config {
backdropClickToClose : false
}
Thanks in advance.
Unfortunately, I have not been able to find how to do this using config. There currently doesn't seem to be a way to do it that way.
The only thing I found is the commit for the backdropClickToClose configuration for $ionicModal, which may give others a clue as to how this can be achieved.
Another idea would be to wrap the $ionicModal in a service and have some default parameters implemented in there, but I am not sure whether that would be a solution to your problem.
If you really want to be able to configure this, you may want to consider submitting an issue on GitHub, which you can do here.

Can a salesforce custom button have some javascript in it?

What is the current way to do a custom button with some js in it?
We are building a custom button that needs to be able to read from the current contact (email address, phone, mailing address), and run a few lines of js. (We also need to create a call record.)
But how/where is this done in salesforce these days?
This page doesn't point me anywhere:
https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_enterprise.htm
And this explanation of the new method in Lightning isn't clear where the js lives:
https://developer.salesforce.com/forums/?id=906F0000000BWr4IAG
Where is the needed example/doc?
If you are using buttons on custom visualforce page there are no any problems with defining custom JS function for it. For example, if you use <apex:commandButton/> you can use such attributes as onclick, onkeydown, onkeyup and other. See more information in documentation.
If you are using buttons on object layouts, you can create custom button and chose executing of JS as a behavior, see attached screenshot.
If you mean some other cases, please, describe it.

salesforce: Is it possible to override Salesforce global search?

There's a search box on the top of Salesforce. Is it possible to override(re-implement) it? Like catching the click event, popping up dialog, or customizing the search result page...
I went over the Visualforce development guide, it seems I can't do this with Visualforce. Any suggestions?
You'd need to use custom sidebar components.
In one of them place javascript that will intercept the events from the global search -> and make that event invoke whatever you want.

How do you get ActionBar from SocialBoo theme to show up in your GUI?

Ok. Starting over with this. I see that the SocialBoo theme has something similar in what I want to achieve. If I find that I can work and improve. I Added a new socialboo theme and created blank GUI. Assumed it would be a Commandbehavior but that didnt do the trick, so did adding tabs. Seems like those components are not for that specific bar... However did notice another issue.
How do I get the social actionbar as displayed in the socialboo theme? (Screen shot). Assuming those images etc are part of the default theme, right.
Also, If I create a TouchCommand = bar, title or native. It displays fine in Gingerbread but not ICS. DO you know why is that? (screen shot)
Thanks, in advance.
Those images aren't a part of the theme, they are a part of the specific demo. If you add a Tabs component to the center of the border layout UI you will get thee tabs where the "icon" property will allow you to customize the unselected icon and you can customize the selected icon as well. You can see the full source/resource file of the social boo demo in the docs and demos zip in the download section.
Generally customizing commands is a bit complex because of platform specific constraints, when running on an Actual Android 4 device we use the native ActionBar by default to provide the experience Android users are used to. This is hard for us to simulate so you will only see this properly in the device build. I suggest not relying on commands, it seems that what you are trying to achieve is easily doable with tabs and its possible that's why you had difficulties in your other question.

Resources