I'm building an app using react with typescript and now for displaying a calendar I'm using Fullcalendar.io
My problem is that I don't know how to intercept the event when you click on the header prev or next as you can see into the attached pic.
The provided solution form the library is this. But I want to know if I can use another smart solution.
Thanks in advice.
I'd like to bump this if I may (apologies if this is not allowed).
I have a similar requirement, to intercept the call to calendar.next(), or at least when the buttons are pressed (as I have no other call to the functions).
My requirement is due to a legal requirement that means I have to have text on my page be bilingual. As Welsh is not a supported locale option, I have to manually adjust the text.
I've had to do similar with Moment.js text, so piggybacking on the function I wrote for that (simple replace text function).
if (userData.languagePref > 1) {
var calMonthText = $('.fc-left h2').text();
var translatedText = translateMomentJsFromNowText(calMonthText);
$('.fc-left h2').text(translatedText);
}
This is called after the calendar is initialised, and works on the initial display, however I need to run this when the next/prev buttons are used as well.
I have created custom Issue Tab Panel with field, where I can add comment when Ill press my custom button “add comment”
In my VM template I have
AJS.$("#add-comment-button").click(function(e) {
e.preventDefault();
AJS.dialog2("#add-status-comment").show();
});
This button works fine and window to write text appears, but… In other section in Issues --> Current Search —> Views (Detail Views), windows with space to write text dont appear when I click button “add comment”. It only appers in normal view of issue… Whats problem?
I'm not sure if I understand your question right so I'll give it a try. Maybe it helps in one or the other way.
As you didn't provide the code affecting the window I assume it is possible you are retrieving the issue key or issue id. There are some Jira JS calls that don't work in every view. The reason is unknown to me, but maybe if you use different calls it will work.
Here is the question and answer to this field availability problem on the atlassian community: https://community.atlassian.com/t5/Jira-questions/Get-issueID-in-JavaScript-in-Project-Screen-viewing-issue/qaq-p/824175
Otherwise you should provide some more information.
Regards
Chris
Is it possible to extend somehow logwork screen in Jira 4.3.3 in order to run custom javascript code when the log button is clicked? I would like to append some custom text to comment text. I don't want to create jira plugin I would like to edit only logwork.jsp.
You should be able to modify the view if you like but I'd highly recommend against it. You will need to preserve or re-do entirely your changes every time you update Jira. It's more work up front but a plugin really is the best route.
I'm facing a issue that I need to call a javascrip function when the user select any row of a SubGrid.
Scenario:
I have two grids, the first one shows accounts records, the second one is supposed to show all the Phones related with the account record that I selected on the first grid.
Is that possible?
Thanks in Advance
CRM Javascipt SDK doesn't support any of those features. You should probably have a custom ribbon button to handle it. Or you can use jquery to attach some events on the record dom. But, this is not supported by CRM 2011.
I am building a web application that will have a fair bit of forms. The html forms are generated using php.
One of the things I came across is this:
I have a drop down box for the user to select his country. Once he selects the country, a call is made to the server to fetch a list of states within that country and populate it in a drop down box.
Initially, I thought I could provide 2 options:
An enhanced jquery version where ajax is used to fetch the states and the populate it in a drop down.
Where javascript is not availiable, the whole page is submitted to the server and then rerendered with the new states in the drop down.
However, onChange() requires javascript. So if someone where to visit the form without javascript enabled, there's no way we can deal with the second option, since javascript is required to submit a form using onChange().
What are some ways to deal with this? My only solution at the moment is to just make javascript mandatory. Users without javascript enabled will see a message saying that the page will not work properly.
Some sites:
Hotmail.com - Refuses to show anything except a "javascript is required message"
Facebook.com - Tells us we should use the mobile version of the site.
Google Maps - Does not work. No message to say javascript is required.
Gmail - Falls back to basic html.
Google account - Does not work. No message to say javascript is required.
Is it acceptable to require users to have javascript enabled at the current state of the web (august 2011)?
Just came across this possible solution:
http://cita.disability.uiuc.edu/html-best-practices/auto/onchange.php
I could perhaps add a button which the user can use to select their country. This should allow us to reload and render the form with the states drop down without any javascript.
You can provide a drop-down of states and tell the user to leave it blank if not applicable. If JavaScript is enabled, it can remove the drop-down until a country where it is applicable is selected.
No, it is not acceptable to require JavaScript; many security-conscious users use NoScript, for example, and would prefer not to turn it off.
By default you should load all possible values into the second dropdown, then clear them out on page load with Javascript. That way people without Javascript enabled can still choose the correct option.
I'm guaranteed to take flak for this, but whether you support no-JS or not should be your call. If you think your userbase is likely to have a sizeable portion of people who disable JS, then you should give them a site that works, but not optimally. If you think most of them will be running with "normal" (air quotes are important there) browsers, then you may consider dropping support for no-JS users.
I am NOT a professional developer, so take my input accordingly. Here are my observations:
I support a website for a wedding cake vendor. Upon observing the competition, all the more appealing sites are embellished (tastefully) with slideshows, dropdowns, animations, interactive form validation, etc.
When scouting for methods to incorporate these features into our site, I found that mostly every classy method was based in javascript.
Figuring it was better to present ourselves as the classy act we are (humble smile), I have decided to require users to have javascript enabled. We've been up for 7 years, and I have not received any complaints. All work on mobile devices.
A compromise option is to start with your State drop-down populated with the states of whatever country your business is in, e.g., all US states, with an extra option (preferably at the top of the list) that says "Other, non-[yourcountrynamehere]". Next to the State drop-down have a text input where the user can type the name of their state if it's not in the list. If JavaScript is enabled then on document-ready you can hide the text input and go with your Ajax solution. Without JavaScript the user has a fully functional page that doesn't even need a reload.
What I ended up doing is to add a button beside the drop down that says "select country". Users without javascript will see this button. Upon clicking it, the page will reload with the list of states rendered.
For users without javascript, this button is hidden, and selecting a country will automatically render a new drop down containing the relevant states.