You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our initializer would end up running every time a LayoutManager is loaded, so it would have to be super fast and detect a lot about its context (what page it's on, who's logged in, etc.).
And given that this plugin is specifically for SRs, WOs, and Inspections (hopefully), it may not make a huge amount of sense.
The text was updated successfully, but these errors were encountered:
If we're to ditch all XML besides Global, the UI anchor elements (#eec-qa-tests) would need to be added through JavaScript instead of being specified in XML. That would require a loader function that would look something like this:
$('.column:first').prepend($('<div class="container" style="width:482px;"><div class="row titleBar" ><img class="toggleButton" src="../Assets/img/layout/s.gif">Quality Assurance</div><div class="row"><div id="eec-qa-tests"></div></div></div>'));
$.getScript('/cityworks-custom/qa-plugin/cityworks-qa/js/eec-qa.js', function() { //TODO: Not working for Ramon
//if (window.location.href.match(/wogeneraledit/i) { //TODO: Why isn't this working?
$.getScript('/cityworks-custom/qa-plugin/cityworks-qa/js/eec-qa-wo.js', function() {
var applicationName = window.location.pathname.split('/');
applicationName = applicationName.splice(0, applicationName.length-2).join('/');
var qaParams = {
application: applicationName,
selector: "#eec-qa-tests",
applyToAllMessage: 'Disabled when "Apply to All" is checked. Please check your data entry carefully.',
statuses: ['COMPLETE']
};
console.log(' Initializing QA Plugin...');
eecQaPlugin.init(qaParams);
});
//} //TODO: else if (window.location.href.match( //(service request stuff)
});
We could potentially simplify the deployment through XML by putting the script injection into the Global XML file with something like this:
Our initializer would end up running every time a LayoutManager is loaded, so it would have to be super fast and detect a lot about its context (what page it's on, who's logged in, etc.).
And given that this plugin is specifically for SRs, WOs, and Inspections (hopefully), it may not make a huge amount of sense.
The text was updated successfully, but these errors were encountered: