Class PublishToSocialNetworkControl

  • All Implemented Interfaces:
    java.util.Observer, VariableResolver, IControl, IDataBoundControl, IDataControl, IRenderer

    public class PublishToSocialNetworkControl
    extends DataBoundControl<ContentTableSource>
    Control to publish content to social networks.
    Example use:
    
     <control:lum_publishToSocialNetwork id="publishToSocialNetworkControl" />
     
    xml data available for xsl rendering:
    
     <control id="publishToSocialNetworkControl" text="STR_PUBLISH_TO_SOCIAL_NETWORK (0)" type="lum_publishToSocialNetwork"  dataId="publishToSocialNetwork">
     	<control>
     		<control type="lum_inputHidden" id="publishToSocialNetworkControl.value" sourceId="none" />
     		<control type="lum_button" id="publishToSocialNetworkControl.button" >
     			<image>lumis/portal/client/images/SocialNetwork.jpg</image>
     			<onClick type="popupRunTimeInterface">
     				<interfaceId>lumis.service.content.publishtosocialnetworks.adminMessagePublication</interfaceId>
     				<addParameters>
     					<parameter name="callbackFunction">
     						<value>flush_publishToSocialNetworkControl</value>
     					</parameter>
     					<parameter name="defaultMessage">
     						<value controlId="title" type="getValue"/>
     					</parameter>
     					<parameter name="sourceValue">
     						<value controlId="publishToSocialNetworkControl.value" type="getValue"/>
     					</parameter>
     				</addParameters>
     			</onClick>
     		</control>
     	</control>
     	<control>
     		<control type="lum_script">
     			<script>
     				function flush_publishToSocialNetworkControl(strValue)
      				{
     					$('#publishToSocialNetworkControl\\.value').val(strValue);
     					var rows = $(strValue).find('row');
     					updateButtonText_publishToSocialNetworkControl(rows.length)
      				}
     				function updateButtonText_publishToSocialNetworkControl(numberOfRows)
      				{
     					var newButtonText = (document.getElementById('publishToSocialNetworkControl.button.text') == null ? null : document.getElementById('publishToSocialNetworkControl.button.text').innerHTML).replace(/\(.*?\)/,'('+numberOfRows+')');
     					var pBtn = document.getElementById('publishToSocialNetworkControl.button.text'); 
     					if (pBtn != null) 
     						pBtn.innerHTML = newButtonText;
     					var pBtn = document.getElementById('publishToSocialNetworkControl.button.img'); 
     					if (pBtn != null) 
     						pBtn.alt = newButtonText;
      				}
     			</script>
     		</control>
     	</control>
     </control>
     
    Since:
    6.1.0
    Version:
    $Revision: 22315 $ $Date: 2019-01-25 18:30:16 -0200 (Fri, 25 Jan 2019) $