Adding new events by dragging from elemensts on the page - fullcalendar

I have some draggable div tags (using jquery) on my page, and would like to be able to drag that tag onto a day in the calander, and add a new event.
Any hints?

here is the feature request for it:
http://code.google.com/p/fullcalendar/issues/detail?id=238
however, i did make this feature for a single client (under os license) and have yet to roll it into a release. the api is sort of sloppily done, but it works:
http://github.com/arshaw/fullcalendar/tree/fcdraggable
download the branch and run examples/external-event-drag.html
im sorry but i can't spend any time w/ u trying to get it up and running.

Cool! Does this rely on tweaks to the 1.4.4 code, or would it work with the 1.4.5? I tried to compare the 1.4.4 standard and 1.4.5 code vs the 'draggable' example files but they are significantly different. I could not tell if it's specifically different for the draggable example or not.

Related

JxBrowser PrintSettings setShrinkToFit Method Missing

In a production situation we observed the behavior where certain prints are Shrinking to Fit, when we would like to avoid this and just let the page contents fill the paper that we will want to print from.
We were looking for an option to disable Fit to Paper / Shrink to Fit and found it on some very early versions of JxBrowser.
Here: http://forum.soapui.org/repository/jxbrowser-1.3rc/doc/index.html?com/teamdev/jxbrowser/printing/PrintSettings.html
and Here: http://forum.soapui.org/repository/jxbrowser-1.3rc/demo/src/com/teamdev/xpcom/mozilla/demo/components/PrintDialog.java
I could not find any history or release notes to track down what happened to this setting, or if there is a workaround for it now.
One more thing, is it possible to prompt the Java Printing window/dialog instead of directly printing if it happens to be a javascript print command?
We are using JXBrowser version 6.7.1
The "Fit to Paper / Shrink to Fit" functionality isn't available in JxBrowser Printing API right now. Please send your feature request to JxBrowser team via your account in Help Desk Center.

The type or namespace name 'FaceBookClient' could not be found

None of the other questions regarding this question were able to answer this. I am new to programming, and I am just trying to add a FacebookLogin option to the website.
I built all the Javascript they wanted, and there is no error there(I don't think). In the interest of saving time, and that I am working on multiple computers. I am going to post pictures of all the code. I have added excess using statements to try and get the reference.
http://imgur.com/a/2wCyf
If you need anymore information let me know. And I will edit this page.
it looks like you just have some simple issues to fix in your IDE/project. The below instructions are for Visual Studio, but can be slightly altered for other IDEs.
First, make sure you have a reference to the Facebook SDK for .NET (I'm assuming you're using Outercurve's library from the looks of it):
In Visual Studio, check in the Solution Explorer window, then expand the "References", and make sure you see it there.
If it's not there, right-click "References", then "Manage Nuget Packages". When the Packages screen pops up, ensure in the left-pane that you have "Online -> nuget.org" selected. In the top right of the Packages window, in the "Search Online" textbox, enter:
facebook sdk and press "enter". On my screen, it's the second search result. To ensure you have the correct one, ensure that the "Created by" field says "Outercurve Foundation" before you accept it. Once you know you have the right package, hit the "Install" button, and it will be added to your project.
Once you have verified you have the correct reference, if you are still having the issue, make sure you have a "using" statement in your class file, to ensure library types you are using are recognized. In this example, I believe that would be:
using Facebook;
From the images of code you provided, I didn't see that statement in there, so that may be the problem, if this is fact the library you are referencing.
I am new to this type of application but what I found that is:
Use Facebook.FacebookClient instead of FacebookClient.

Adobe Extendscript Photoshop Guides Visibility

Is there a way via extendscript (jsx) to get the visibility status of Photoshop' guides?
The code to show and hide the guides is the same code as it 'toggles' the guides on or off so it must know the status when this code is executed, but how do I get at it?
I appreciate this could be done via a preference switch but that seems an awkward hack for something this simple, especially as something somewhere must be accessing this 'property' during execution of the 'toggle' code.
What would be great is to have activeDocument.guides.visible property, returning either true or false. Is there anything like that?
EDIT:
OK. Further investigation reveals that creating a guide using guides.add does not automatically toggle guides ON, however, using the code generated via the scriptListener does.
I would rather use guides.add as its only one line of code compared to fourteen so in order to toggle the guides to ON I thought I could run a function that created and then deleted a guide using the scriptListener code during the onLoad of the HTML.
This works great, except getting this function to run only when a document is opened is now the new problem.
documentAfterActivate is supposed to be the code to do this except it doesn't work unless a flash panel such as kuler is opened first.
So the question now is really what part of the flash code is allowing documentAfterActivate to work properly and how can I use it in my code instead of opening a flash panel I don't need?
It doesn't look like you've got a direct toggle option. You'd need to record the position of the guides somewhere and use script listener code to clear them when you wanted to toggle them off and use the add method on the Guides object to re-add them.
Keep in mind that even getting to the guide position via the photoshop DOM wasn't avail before CS4 I think? maybe CS5.
And i realised I just mis-read your question quite a bit. Anyway, this way you'd also know if the guides were visible based on whether or not they are there :) But yes, it isn't as nice as it could be.
The solution:
As stated, the workaround is to create and delete a guide with the fourteen lines of code from the scriptListener.
This toggles the guide visibility to ON regardless of its current state.
I can then save this status as a preference using putCustomOptions.
A function to do this is fired during the onLoad of the HTML but only when a document is opened otherwise guide creation fails.
documentAfterActivate does not work as expected unless a further flash panel (such as Kuler) is also opened beforehand.
An alternative to documentAfterActivate is to register the open event using CSevent instead.
The code can be found HERE.

Using QT For Creating a Screen Dimmer

I'm trying to implement a screen dimmer using QT4 and I wanted some advice before I get cracking instead of going into this blindly.
I want to create a top-level window that has no frame. I was thinking of making the background black and messing with the opacity so that it will dim the screen out after the system is idle for a given period of time.
The problem with this is that if this window is always on top, how can I pass click events to the window underneath it? I'm not the least bit familiar with the windows API (the solution only has to work under windows), but I'm guessing that's a good place to start. Can anyone point me to some useful classes/functions or suggest another way of doing this via QT?
If anyone's interested in the solution I came up with and the windows API functions I used, you can check out my blog posting here: http://sarcastichacker.com/getnextwindowandgetforegroundwindow
I will be updating the source and making another related posting on the same blog within the next couple of days.

Regression testing for styling and layout of web applications

I realise this is a non-trivial task, but is there a way to regression test the styling and rendered layout of a web application?
I've found it straightforward to unit test and regression test functionality, both server-side and client-side.
However, a frustrating issue I've run into are CSS changes made to fix one layout issue that break the layout and styling on a different page. The only way I know how to detect these is to manually view every page in an application, and compare it with my own expectations, but obviously this can be burdensome and expensive when an application can have dozens of pages. Has there been any research using image processing or other techniques to detect these kinds of problems automatically?
Actually, one of the hidden gems of Selenium is that you can use it to take screen captures of the browser. Then using a technique as described in Find differences between images using C#, you can highlight the differences between previous snapshots.
This example shows how to grab a screenshot of the homepage and then create a difference image. With a little extra tinkering, you can use the same technique to count the pixels that are different.
[Test]
public void CompareHomePageToPrevious()
{
string fileName = Path.Combine(Environment.CurrentDirectory, "homepage.bmp");
var selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://mywebsite");
selenium.Start();
selenium.Open("/");
selenium.CaptureEntirePageScreenshot(fileName, "");
// Load current and previous captures
var current = new Bitmap(filename);
var previous = new Bitmap(_previousHomepageImage);
// Find all pixels that are the same and make them pink
Bitmap diff = ImageTool.GetDifferenceImage(current,previous,Color.Pink);
diff.MakeTransparent(Color.Pink);
// Save the image for viewing
// or count the number of different
}
Selenium is a really interesting choice because it's cross-platform and cross-browser, meaning that you can capture screens of different browsers. You can use this technique to compare snapshots between builds or to compare between browsers.
There is a way to test the layout of a web application using Galen Framework. This tool has its own language and is very easy to learn and understand. It is a Selenium-based and you can run tests in Selenium Grid, (Sauce Labs) if you want to test your application in different browsers.
This tool gets the location of a specified element on the page and check them relatively to each other.
Example: if you want to check that a menu pane is below the header and stretches to the width of a browser and has 50 pixels height, you can do it like this:
menu
below: header 5px
width: 100% of screen/width
height: 50px
This tool can also be used to test responsive designs.
You can find complete documentation on the official website, http://galenframework.com.
The best part is you can even create Java tests. The Galen JavaScript API is also available along with the sample projects on GitHub.
Again, test(s) written once can be used at multiple phases of the application life cycle.
I guess you could generate an 'ideal' shot of each page in your web application to use as reference.
Then generate a new shot of every page after a CSS update and compare with the previous ones. A 1:1 comparison should be okay if you make sure you always keep the same resolution, etc.
You could even make it so that you can tell it that if the page differs, the other page is actually 'better' than the example and to use the 'other' as the example for the next runs.
That way, when you fix something you can see the difference for one page, and mark it as being better, and then fix a bug on another page while making sure you don't regress the bug you were trying to fix in the first place.
You should check out Web Consistency Testing as an approach to do your regression testing.
If you're developing in Ruby, take a look at the rspec-page-regression gem. It's an RSpec plugin that lets you compare requested page snapshots against an expected image. It works with Poltergeist, which is a Capybara driver that uses PhantomJS and supports rendering page snapshots.
Rspec-page-regression provides an RSPec matcher that lets you do things like
context "user page" do
before(:each) do
visit user_path
end
it { page.should match_expected }
context "popup help" do
before(:each) do
click_button "Help"
end
it { page.should match_expected }
end
end
And it provides a mechanism to manage the expectation images.
Disclaimer: I'm the author of the gem.

Resources