popover

Twitter Bootstrap Popup ignores delay

谁都会走 提交于 2019-12-05 05:25:21
Following this question here on stackoverflow, I created a twitter bootstrap popover that loads on hover. However, the delay is not used, the popover just shows immediately. Here's my code: $('body').delegate('.withajaxpopover', 'hover', function(event) { if (event.type === 'mouseenter') { var el=$(this); $.get(el.attr('data-load'), function(d) { el.popover({delay: { show: 750, hide: 100 }, title: "MyTitle", content: d}).popover('show', {delay: { show: 750, hide: 100 }}); }); } else { $(this).popover('hide'); } }); $('body').delegate('.withajaxpopover', 'click', function(event) { $(this)

When using Twitter's Bootstrap, how can I change a popover's content?

南楼画角 提交于 2019-12-05 01:54:11
I'm using the popover feature from Twitter's Bootstrap js. I have a button that, when clicked, executes this javascript: $("#popover_anchor").popover({trigger: "manual", placement: "below", offset: 10, html: true, title: function(){return "TITLE";}, content: function(){return "CONTENT TEXT";}}); $("#popover_anchor").popover("show"); There's also another button that executes basically the same javascript, except that the title and content functions return different text. Note that they both define the popover on the same element, just with different content. The problem is, once either button

Swift, Pass data back from popover to view controller

岁酱吖の 提交于 2019-12-05 00:00:25
问题 I have sorted the original array in popover controller. Now I want to send that array back to the original view controller for tableview and map view. Below is my code If propertyNameSrt == false { if ascSorting == false { properties.sort(sorterForbuildingAsc) } else { properties.sort(sorterForbuildingDesc) } } My array is properties which includes custom object. How can pass this to my original view controller? Thanks in advance, Dhaval. 回答1: You can use delegate(protocol) methods to send

Xcode Swift OS X popover behavior

本秂侑毒 提交于 2019-12-04 21:09:51
For my small Mac menubar application I'd like the behavior of the popover to be transient, so when it loses focus, it will close. This works for that: popover.behavior = NSPopoverBehavior.Transient But it only works once, so the second time you click somewhere else the popover stays. I placed the code in func applicationDidFinishLaunching(notification: NSNotification) , but placing it outside this function inside the class did not work. How can I use force this behavior all the time? I am using Xcode 7.0 with Swift (2.0). You better leave the behaviour to the default value which is

Angular UI Bootstrap Popover adding a close button

落爺英雄遲暮 提交于 2019-12-04 20:10:20
问题 I have the following pop-up and trying to add a close button to be able to close it. .directive("popoverHtmlUnsafePopup", function () { 'use strict'; return { restrict: "EA", replace: true, scope: { title: "@", content: "@", placement: "@", animation: "&", isOpen: "&", manualHide: '&' }, templateUrl: "views/popover/popover-html-unsafe-popup.html" }; }) .directive("popoverHtmlUnsafe", [ '$compile', '$timeout', '$parse', '$window',"$tooltip", function ($compile, $timeout, $parse, $window,

Why does the status bar appear when popoverPresentationController is called in Swift?

无人久伴 提交于 2019-12-04 19:55:50
In my app you can tap a UIButton and a popover pops up and shows the Photo Library of the user. I am using this code to make that happen: let picker = UIImagePickerController() picker.allowsEditing = false picker.sourceType = .PhotoLibrary picker.modalPresentationStyle = .Popover self.presentViewController(picker, animated: true, completion: nil) picker.popoverPresentationController?.sourceRect = CGRectMake(600,180,0,0) picker.popoverPresentationController?.sourceView = self.view The code above works fine and does shows the popover to the user. However, it also shows a white status bar . I

Auto hide bootstrap popover [closed]

柔情痞子 提交于 2019-12-04 16:05:41
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I want to hide automatically the Bootstrap popovers after a few seconds. When the user hovers over a control, the popover must be displayed, but if the user doesn't move the mouse pointer, this popover must be hidden automatically after few seconds. That is important because in a

How to change the size of a popover

ⅰ亾dé卋堺 提交于 2019-12-04 15:22:59
问题 I'm having trouble changing the size of my popover presentation. Here is what I have so far override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) // func for popover { if segue.identifier == "popoverView" { let vc = segue.destinationViewController let controller = vc.popoverPresentationController if controller != nil { controller?.delegate = self controller?.sourceView = self.view controller?.sourceRect = CGRect(x:CGRectGetMidX(self.view.bounds), y: CGRectGetMidY(self

Bootstrap 3 popover and tooltip on the same element

久未见 提交于 2019-12-04 10:55:18
问题 it is possible to use a tooltip and popover of Bootstrap 3 on the same element? I have a table and want to show on each row (tr) a tooltip. Additionally I want to show a popover when a user clicks on the row. Both components need the data-toggle attribute so I doubt it is possible to do so. Does anybody knows if it is possible or if there is a workaround? 回答1: You dont have to use data-toggle , title and so on. Invoke the bootstrap plugins manually. See this example : <table> <tr tooltip

How can I close a Safari App Extension popover programmatically?

亡梦爱人 提交于 2019-12-04 10:29:46
问题 I'm building a Safari App Extension using XCode 8.3 and Swift 3, following the Safari App Extension Programming Guide. The extension includes a popover that appears when the extension's toolbar item is clicked. The popover view contains a few buttons linked to actions the user can perform. I want clicking one of these buttons to close the popover after its action has been performed. By default, clicking anywhere outside of a popover closes it, but I haven't been able to find any other way to