mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 15:20:29 +01:00
2016-03-24 Fred Gleason <fredg@paravelsystems.com>
* Update web test methods in 'web/tests/'. * Added an 'RDSchedCode' class in 'lib/rdschedcode.cpp' and 'lib/rdschedcode.h'. * Implemented the 'ListSchedCodes' web method in 'web/rdxport/schedcodes.cpp'. * Implemented the 'AssignSchedCode' web method in 'web/rdxport/schedcodes.cpp'. * Implemented the 'UnassignSchedCode' web method in 'web/rdxport/schedcodes.cpp'. * Implemented the 'ListCartSchedCodes' web method in 'web/rdxport/schedcodes.cpp'. * Extended 'RDGetWebTime()' and 'RDGetWebDateTime()' functions to support XML 'xs' namespace formats. * Implemented '*_POINT' fields in the 'EditCut' web method in 'web/rdxport/carts.cpp'. * Modified the 'RDCart::removeSchedCode()' method so as to treat scheduler codes in a case-insensitve manner. * Modified the return of the 'EditCut' web method to provide a full <cutList> record in 'web/rdxport/carts.cpp'.
This commit is contained in:
73
web/tests/editcart.js
Normal file
73
web/tests/editcart.js
Normal file
@@ -0,0 +1,73 @@
|
||||
// editcart.js
|
||||
//
|
||||
// Script for selecting cart label elements for the EditCart web method
|
||||
//
|
||||
// (C) Copyright 2015 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
function EditCart_Field(field)
|
||||
{
|
||||
if(document.getElementById("USE_"+field).checked) {
|
||||
return '&'+field+'='+UrlEncode(document.getElementById(field).value);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
function EditCart_MakePost()
|
||||
{
|
||||
var form='COMMAND=14';
|
||||
form+='&LOGIN_NAME='+document.getElementById("LOGIN_NAME").value;
|
||||
form+='&PASSWORD='+document.getElementById("PASSWORD").value;
|
||||
form+='&CART_NUMBER='+document.getElementById("CART_NUMBER").value;
|
||||
if(document.getElementById("INCLUDE_CUTS").value.length==0) {
|
||||
form+="&INCLUDE_CUTS=0";
|
||||
}
|
||||
else {
|
||||
form+="&INCLUDE_CUTS="+document.getElementById("INCLUDE_CUTS").value;
|
||||
}
|
||||
form+=EditCart_Field("ASYNCHRONOUS");
|
||||
form+=EditCart_Field("ENFORCE_LENGTH");
|
||||
form+=EditCart_Field("FORCED_LENGTH");
|
||||
form+=EditCart_Field("GROUP_NAME");
|
||||
form+=EditCart_Field("TITLE");
|
||||
form+=EditCart_Field("ARTIST");
|
||||
form+=EditCart_Field("YEAR");
|
||||
form+=EditCart_Field("SONG_ID");
|
||||
form+=EditCart_Field("ALBUM");
|
||||
form+=EditCart_Field("LABEL");
|
||||
form+=EditCart_Field("CLIENT");
|
||||
form+=EditCart_Field("AGENCY");
|
||||
form+=EditCart_Field("PUBLISHER");
|
||||
form+=EditCart_Field("COMPOSER");
|
||||
form+=EditCart_Field("CONDUCTOR");
|
||||
form+=EditCart_Field("USER_DEFINED");
|
||||
form+=EditCart_Field("OWNER");
|
||||
form+=EditCart_Field("NOTES");
|
||||
|
||||
return form;
|
||||
}
|
||||
|
||||
function EditCart_ShowPost()
|
||||
{
|
||||
alert('form: '+EditCart_MakePost());
|
||||
}
|
||||
|
||||
|
||||
function EditCart_Submit()
|
||||
{
|
||||
PostForm(EditCart_MakePost(),"http://localhost/rd-bin/rdxport.cgi");
|
||||
}
|
||||
Reference in New Issue
Block a user