duplicate button in dojo / jquery
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

using the sample link here - http://esri.github.io/calcite-maps/samples/arcgis-4.x/arcgis-4.x-2d-3d.html

how would i duplicate the button 'info' from the dropdown menu on the left to the right hand menu after the search?

Hello can u please ellaborate.I can see the info button. Where to add this info button.Thank you
Codeword 1 year ago
on the main navbar at the top right side - after search widget
weaverk 1 year ago
Will jquery code do ?
Codeword 1 year ago
if it works as expected with the panels sure that would be fine!
weaverk 1 year ago
At what point do you want the duplication to happen? when the user clicks info(in the left) its should appear on the top right? Or when the user opens the page, the user should see the info button already on the right after scene?
mashtullah 1 year ago
i want a button on the main Navbar that has the same functionality as the button already on the dropdown menu
weaverk 1 year ago
awarded to Codeword

Crowdsource coding tasks.

1 Solution

Winning solution

add the below li tag to <ul class="calcite-nav nav navbar-nav">
<li>
    <a id="infobutton" class="hidden-xs hidden-sm" aria-controls="3Dtab" role="tab" data-toggle="tab" data-tooltip="tip" title="3D View" data-placement="bottom"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span><span class="panel-label">Info</span></a>
</li> 
javascript code below

$('#infobutton').on('click',function(){
    var ref = $('#panelInfo');
    var ref1 = $('#collapseInfo');
    if(ref.hasClass('in')){
        ref.removeClass('in');
        ref.css('height','0px');
        ref1.removeClass('in');
    }else{
        ref.addClass('in');
        ref.css('height','auto');
        ref1.addClass('in');
    }

});
hmm, just a couple of points - when i do it this way, the infobox opens as a small box saying "info" then when you click the i you get the main infobox you would get directly if you click from the menu and also closing the infobox and opening it again using this button seems to make it appear slightly differently - as if the css wasnt processed normally (gray box instead of blue) - none of these issues happen with using the button from the menu
weaverk 1 year ago
ah you just updated your answer, let me check again :)
weaverk 1 year ago
seems to have the same issue... :(
weaverk 1 year ago
Test it and I will make the modifications needed and the css can also solved.Let me know and better if you send me a screen shot of the issue,it would be more helpfull.Thank you
Codeword 1 year ago
Hey I just update my solution, please check and let me know the issue in any.Thank you
Codeword 1 year ago
hey, thanks! you fixed the css now - making progress! please see the screenshot of the small box issue here https://docs.google.com/document/d/1PDcOcQdroKDf1yUGC1xJ0HtKqL4YAQkR-jUUv2yCebI/edit
weaverk 1 year ago
okay, It seems I have got it.Fixing soon bear with me.Thank you
Codeword 1 year ago
i want it to skip the small button click phase (click menu button, get open window with content) - the same way if you click the info text from the dropdown menu, it takes you straight to the open content window :)
weaverk 1 year ago
oaky got it.
Codeword 1 year ago
Hey, weaverk , problem fixed and now its fully workin, I have downloaded the code and tested it by myself, Please check the code.Thank you
Codeword 1 year ago
your help has been super! thanks for the help and hard work! ;)
weaverk 1 year ago
Thank you weaverk, for awarding me the bounty.
Codeword 1 year ago