Gigya Job Openings

Template_gigya Production Changes

Skip to end of metadata
Go to start of metadata
dekiapi();
jquery.ui("smoothness");
// Gather options from parent (form)
var options = String.eval(page.parent.properties.options.text);
var params = string.deserialize(options.params);




"
Deki.$(document).ready(function() {    //when the document is ready...
    Deki.$('.datepicker').datepicker();
    Deki.$('.resizable').resizable();
    Deki.$('#ticketProperties').find('input, select,textarea').change(function(){
        $self = Deki.$(this);
        var prop = 'urn:custom.mindtouch.com#'  + $self.attr('name');    // url that retrieves the page properties
        Deki.Api.ReadPageProperty(null, prop, function(result) {
            if(result.etag) {    // page property exists, write over it.
               Deki.Api.UpdatePageProperty(result.href, $self.val(), result.etag, function() {
                    reportSuccess($self);
         }, function(result) {
             alert('An error occurred trying to update the store (status: ' + result.status + ' - ' + result.text + ')');
         });
     } else {    // page property doesn't exist, create one.
         Deki.Api.CreatePageProperty(null, prop, $self.val(), function() {
                    reportSuccess($self);
                }, function(result) {
             alert('An error occurred trying to create the store (status: ' + result.status + ' - ' + result.text + ')');
         });
     }
        }, function(result) {
     alert('An error occurred trying to read the store (status: ' + result.status + ' - ' + result.text + ')');
        });
    });
});
"
"
var reportSuccess = function($self) {
    $self.addClass('value_updated');
    setTimeout('$self.removeClass(\\'value_updated\\')',1000);
}
"
"
#ticketProperties table {    border-spacing:0;border-collapse:collapse;    }
td.label {    background-color:#F0F0F0; font-weight:bold; width:150px;    }
.value_updated {    background-color:#FFFFA7 !important;    }
"


     "Back to form" 


    
        
            foreach(var param in params){
                var type = param.value.type;
                if(! type){
                    if(param.value.data is list || param.value is map)      let type = 'select';
                    if(!param.value.data || param.value.data is str)                let type = 'text';
                }
                if(param.value.show == 'table' || param.key=='title')    continue;      // skip if not supposed to be seen here.
                
                     param .value.label ?? String.toCamelCase(param .key) 
                    
                        var property = Map.values(map.select(page.properties, "$.key=='"..String.replace(String.toLower(param .key)," ","_").."'"))[0];
                        if(param.value.editable !== false){
                            switch(type){
                                case 'suggest':
                                    if(param.value.data is list){
                                        
                                    }
                                    break;
                                case 'text':
                                    
                                    break;
                                case 'textarea':
                                    var resizable = (typeof param.value.resizable == typeof null || param.value.resizable) ? 'resizable' : '';
                                    property.text
                                    break;
                                case 'datepicker':
                                    
                                    break;
                                case 'hidden':
                                    property.text;
                                    break;
                                case 'title':
                                    
                                    break;
                                case 'status':    // follow through.
                                case 'select':
                                    if((param.value.data is map) || (param.value.data is list)){
                                        
                                        property.text
                                         ""
                                        foreach(var option in param.value.data){
                                             option 
                                        }
                                        
                                    }
                                    else{
                                        param.value.data
                                    }
                                    break;
                                default:    // ignore.
                                    break;
                            }
                        }
                        else {
                            property.text
                        }
                    
                
            }