How do I hook paper-tabs and core-animated-pages together? - polymer

I've been going over Rob Dudson's I/O talk (at 27:00) and trying to use core-animated-pages with paper-tabs.
When I click the tab, I would like some respective content to be shown, with the animation.
I tried to follow Rob's approach of using the designer, but somehow I do not get the 'selected' property in the properties panel.
The polymer docs cover tabs and animated-pages separately, so I don't know how I can get them to work together.
Can someone point me in the right direction?

There is a bug in the currently deployed designer tool that prevents certain bindable attributes from being displayed in the properties pane. It has been fixed in master, so the next time the Polymer team deploys the tool, it should fix your problem.
In the meantime, you could install the tool using bower install Polymer/designer#master to get the fixed version locally.

core-animated-pages works with div tags. Then just add addEventListener to select the page.
Here is a working example (jsfiddle): Click here.

Related

How to create popup windows in html

I want to know how the pop up windows integrated into websites are built. I am trying to create one for my websites but i don't really know it is created whether they are plugins or not. Any help as to how to go about it.
Below is an example of what i want to do.
You can use hotjar.com to put a feedback box in your page, there is a lot of services that provides this feature, but hotjar gets the job done
Beginner! To make a pop-up like the one you provided, you would need to write backend code (Node.JS, PHP, Python, etc.). But for just a simple info pop-up with a button that activates the pop-up refer to this jsfiddle I created:
https://jsfiddle.net/d706dyg7/1/
$("#whateverid").click(function(){
//whatever code
});
That mean when that element is clicked blah happens.
Hope that helps,
Ben A.K.A BlackSky
P.S. If you want a solution in pure javascript and not jQuery just let me know and I will edit my fiddle!
I know I'm like .. 10 years late. But for anyone still wondering I thought I could be of some help!
If you want to do this using ONLY html and css (using a framework in visual studio like ASP.NET) for example.. here's what I did:
First, I made sure I had multiple "divs" in my code. For me specifically, I had two main ones. The first one whose id="main", and another whose id="popup" with the 'visible' property initially set to 'false' for the popup div.
Then, on whichever event you're looking for (button click for example) you'll simply set main.Visible = false and popup.Visible = true, then you could have more buttons in your popup (yes, no, cancel, confirm, etc.) which do the exact same thing, but in reverse!
The most important thing to make sure of is that you have the 'runat="server"' property in your divs so that you can access them in your CS code
Hope this was helpful! :)
Your looking for something called a modal. Depending how you wrote your HTML there are different ways of approaching this issue.
If your wrote your website in Plain HTML you can use the following tutorial to create one
www.webdesignerdepot.com/2012/10/creating-a-modal-window-with-html5-and-css3/amp/
However if you wrote your website with a library such as Bootstrap they have built in pre made modules that you can attach to your cpde. These can Ben found in the library's documentation.

Script/Design toggle button in polymer designer malfunction

I am experiencing a weird behavior of the polymer designer tool. When I click on the code/designer toggle button it switches to the code. Then when I switch back to the design it is gone. The Tree also only shows the default my-element element. Am I the only one who is experiencing such behavior? Is there a solution?
PS: I'm using chrome.
If you can't wait for the fix on the Polymer site, then you can clone the designer code from GitHub https://github.com/Polymer/designer and you'll find that the bug doesn't exist in that code.

Remove widgets from p:dashboard via dragging out

I'd like to add support to removing the widgets from p:dashboard via dragging the panel out of dashboard, such as in WordPress admin panel.
I've found out the examples of dragging the widgets between 2 dashboards, but in my case I need to have callback when the element is dragged out of dashboard, no matter where. The widget would be than removed. However, I couldn't find any example for such behaviour.
What components/tools to use to implement such functionality? I'm using PrimeFaces 3.4.
Use draggable component with dashboard keyword;
<p:draggable for="widget" dashboard=":dbForm:dashboard"/>
And check this solutions on forum page of primefaces: Dashboard Drag and Drop
Hope it'll help you.
Good Luck!

Monodevelop: can't drag widgets

I am trying to use monodevelop. Just at the beginning I came across an issue:
I was following a tutorial on building a Gtk application (http://monodevelop.com/Stetic_GUI_Designer). I was trying to drag a button from the Widgets Palette. Nothing happened. I'd been trying quite a few times without any luck.
After a break I launched monodevelop again and I simply placed a button on the window of the application. After that I removed it, dragged VBox container, and placed menu bar on the window, according to the tutorial instructions. I was pleasantly surprised.
By the second try the same problem occurred - I was not able to drag any widgets. Dragging was beginning, there was a “+” sign at the cursor and then - nothing was happening. I cannot figure out what happened by the first time, what the difference was. Have anyone had a similar problem? Monodevelop looks promising, but I can't go on with it. (I tried placing 'Fixed' container on the window, with no result - I could not drag it.)
(monodevelop v. 2.4, ubuntu 11.04, Polish language.
I did look for an answer to my problem, without much luck, that is why I post this question. The problem is described quite precisely. There is a probability that others encountered the same issue.)
You need to drag a container on the form first before you can add widgets to it. The VBox container is an example of a place where you can put your widgets.
If you want to place widgets where ever you want you can use the Fixed container. If you want things to align you can use the VBox, HBox or Table containers. Placing in a widget in one of the fields will automatically adjust the size of this field to fit the widget you have dragged into it.
So basically,
Create a form
Drag a container on the form
Drag a widget inside the container.
These widgets are not to be confused with the custom made widgets (in your Solution browser, right click the folder User Interfaces and click Add Widget...). These are like forms. I use these to create GUI's in advance so I can call these while the program is running.
FYI: if you want to create code for a widget (like a button) you can't just double click it like in Visual Studio. You need to select it, the go to the properties pane, and change the tab from Properties to Signals. You can then double click the "signal" to create the event for which you want to create code. For a button this is usually the Clicked event (somewhere at the bottom of the list, you'll need to open the Button Signals)
You can always visit the IRC channel of Monodevelop on irc://irc.gimp.org/monodevelop (IRC.Gimp.org #monodevelop)
I also sit in this channel and can help with smaller problems and I also still use Monodevelop 2.4.

How do I enable right-click (control-click) context menus in MonoDevelop?

Right Click (or control-click since I'm on a Mac) doesn't bring up the context menus for Solution or Projects.
For instance, in Visual Studio I would right click on a Solution to add a new project to the solution. I've looked all through the menu and can't find the add project command.
Also, how do I add a folder to a project? Again, this would be available from the right-click menu in VS, but I can't find it anywhere in MonoDevelop.
Control-click doesn't do anything for me in any part of MD. Not even in the text editor. Is there a setting to get it to behave the way I'm expecting it to?
Shouldn't these options also be available via the main menu also?
Apparently this was a known issue and has been fixed. It was a bug in the gtk+ library. Single button mice weren't supported.
https://bugzilla.novell.com/show_bug.cgi?id=359734
https://bugzilla.gnome.org/show_bug.cgi?id=346609
Still not sure why I'm seeing this bug now on my OSX 10.6.4 machine running the latest download of MonoDevelop.
Plugging in a 2-button mouse is an adequate work-around. I can right click and get the context menus I was looking for.
These features are where you would expect to find them, exactly where you said. The solution context menu contains Add > Add new project and the project context menu has Add > New folder
I'm on a macbook so I get to use the old double-finger tap, rather than CTRL+Clicking all the time. Not sure why the CTRL+Click is not working for you.
EDIT:
Control-Click anywhere in the solution explorer seems to bring up a context-sensitive context menu. Control-Click whilst solution is selected brings up the solution context menu and if a project is selected, the project context menu.
Control + click doesn't work but a two finger touch brings up the context menus on my Macbook Pro. Check your "Trackpad" settings in system preferences to see how you have secondary click setup on your mac.