Rivendellaudio/web/tests/editcut.js
Fred Gleason 03cfa9d614 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'.
2016-03-24 13:53:39 -04:00

79 lines
2.5 KiB
JavaScript

// editcut.js
//
// Script for selecting cut label elements for the EditCut 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 EditCut_Field(field)
{
if(document.getElementById("USE_"+field).checked) {
return '&'+field+'='+UrlEncode(document.getElementById(field).value);
}
return '';
}
function EditCut_MakePost()
{
var form='COMMAND=15';
form+='&LOGIN_NAME='+document.getElementById("LOGIN_NAME").value;
form+='&PASSWORD='+document.getElementById("PASSWORD").value;
form+='&CART_NUMBER='+document.getElementById("CART_NUMBER").value;
form+='&CUT_NUMBER='+document.getElementById("CUT_NUMBER").value;
form+=EditCut_Field("EVERGREEN");
form+=EditCut_Field("DESCRIPTION");
form+=EditCut_Field("OUTCUE");
form+=EditCut_Field("ISRC");
form+=EditCut_Field("ISCI");
form+=EditCut_Field("START_DATETIME");
form+=EditCut_Field("END_DATETIME");
form+=EditCut_Field("MON");
form+=EditCut_Field("TUE");
form+=EditCut_Field("WED");
form+=EditCut_Field("THU");
form+=EditCut_Field("FRI");
form+=EditCut_Field("SAT");
form+=EditCut_Field("SUN");
form+=EditCut_Field("START_DAYPART");
form+=EditCut_Field("END_DAYPART");
form+=EditCut_Field("WEIGHT");
form+=EditCut_Field("START_POINT");
form+=EditCut_Field("END_POINT");
form+=EditCut_Field("FADEUP_POINT");
form+=EditCut_Field("FADEDOWN_POINT");
form+=EditCut_Field("SEGUE_START_POINT");
form+=EditCut_Field("SEGUE_END_POINT");
form+=EditCut_Field("HOOK_START_POINT");
form+=EditCut_Field("HOOK_END_POINT");
form+=EditCut_Field("TALK_START_POINT");
form+=EditCut_Field("TALK_END_POINT");
return form;
}
function EditCut_ShowPost()
{
alert('form: '+EditCut_MakePost());
}
function EditCut_Submit()
{
PostForm(EditCut_MakePost(),"http://localhost/rd-bin/rdxport.cgi");
}