From: Jagadedes Date: Tue, 23 Sep 2014 09:46:27 +0000 (+0530) Subject: #29750 progress bar page show. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b18480e2dd1951704397baa3e32f1e3dee1e2988;p=com.zyxware.civiwci.git #29750 progress bar page show. --- diff --git a/CRM/Wci/Form/CreateWidget.php b/CRM/Wci/Form/CreateWidget.php index 351446b..24eedbb 100644 --- a/CRM/Wci/Form/CreateWidget.php +++ b/CRM/Wci/Form/CreateWidget.php @@ -1,6 +1,7 @@ add('text', 'title', ts('Title'),true); $this->add('text', 'logo_image', ts('Logo image')); $this->add('text', 'image', ts('Image')); - $this->add('select', 'button_link_to', ts('Contribution button'), $this->getContributionPageOptions()); + $this->add('select', 'button_link_to', ts('Contribution button'), getContributionPageOptions()); $this->add('text', 'button_title', ts('Contribution button title')); $this->add('select', 'progress_bar', ts('Progress bar'), array('' => '- select -')); $this->addWysiwyg('description', ts('Description'), ''); @@ -120,6 +121,7 @@ class CRM_Wci_Form_CreateWidget extends CRM_Core_Form { } function postProcess() { + $values = $this->exportValues(); parent::postProcess(); diff --git a/addmore.js b/addmore.js index 9d25e16..32517c8 100644 --- a/addmore.js +++ b/addmore.js @@ -1,71 +1,49 @@ // Updated to wait until the document is loaded. addmore_link -jQuery(document).ready(function () { -// var text = jQuery('h1').text(); -// alert(text); - -}); - cj(function ( $ ) { -// var text = jQuery('h1').text(); -// alert(text); - - $('#addmore_link').on('click', function( e ) { - e.preventDefault(); -// $('#addmore_link').click(function () { - var count = parseInt($('input[name=contrib_count]').val()); - count++; - - //$('#myDiv').append('
'); - - //$('#myDiv').append(''); -// var contr_name = "contribution_page_" + count.toString(); - //$('input[name=percentage_1]').parent('div').parent('div').parent('div').append(''); -// $('#crm-container').append(''); - - var c_page = $('select[name=contribution_page_1]').clone().attr('id', 'choices_' + $(this).index()); - c_page.attr("id", "contribution_page_" + count); - c_page.attr("name", "contribution_page_" + count); - //.insertAfter("select[name=contribution_page_1]"); + $('#addmore_link').on('click', function( e ) { + e.preventDefault(); + var count = parseInt($('input[name=contrib_count]').val()); + count++; + + var c_page_sel = $('select[name=contribution_page_1]').clone().attr('id', 'choices_' + $(this).index()); + c_page_sel.attr("id", "contribution_page_" + count); + c_page_sel.attr("name", "contribution_page_" + count); + + var id_section = "crm-section-con-" + count; + var sect_tag = "
"; + $('#addmore_link').parent().parent().before(sect_tag); + + var id_content = "content_con-" + count; + $('#' + id_section).append("
"); + $('#' + id_content).append(c_page_sel); + $('#' + id_content).append(' Remove'); + $('#' + id_section).append("
"; + $('#addmore_link').parent().parent().before(sect_tag); + + id_content = "content_per-" + count; + $('#' + id_section).append("
"); + $('#' + id_content).append(''); + $('#' + id_section).append("") - $('input[name=percentage_1]').parent().parent().append(c_page); -// $('input[name=percentage_1]').parent('div').append('
'); -// $('input[name=contribution_page_' + count + ']').text($('input[name=contribution_page_1]').text()); - - $('input[name=percentage_1]').parent().parent().append(' Remove'); - - $('input[name=contrib_count]').val(count); - alert(count); - //alert(contr_sel); - //alert($('input[name=contrib_count]').val()); - //alert($('select[name=contribution_page]').val()); - //alert($("select[name=contribution_page] option:selected").text()); - //alert($("#count").val()); - //$('select[name=contribution_page]'). - - }); - - $('#remove_link').on('click', function( e ) { - e.preventDefault(); - alert("hi"); - }) -/* - $(function() { - var scntDiv = $('#p_scents'); - var i = $('#p_scents p').size() + 1; - - $('#addmore_link').live('click', function() { - $('

Remove

').appendTo(scntDiv); - i++; - return false; - }); - */ - + }); diff --git a/wci.civix.php b/wci.civix.php index 17361db..86eba52 100644 --- a/wci.civix.php +++ b/wci.civix.php @@ -169,7 +169,7 @@ function _wci_civix_civicrm_managed(&$entities) { $es = include $file; foreach ($es as $e) { if (empty($e['module'])) { - $e['module'] = 'civicrm-wci'; + $e['module'] = 'org.civicrm.wci'; } $entities[] = $e; } @@ -198,7 +198,7 @@ function _wci_civix_civicrm_caseTypes(&$caseTypes) { // throw new CRM_Core_Exception($errorMessage); } $caseTypes[$name] = array( - 'module' => 'civicrm-wci', + 'module' => 'org.civicrm.wci', 'name' => $name, 'file' => $file, ); diff --git a/wci.php b/wci.php index 18d6a6e..3bb9596 100644 --- a/wci.php +++ b/wci.php @@ -179,3 +179,5 @@ function wci_civicrm_navigationMenu( &$params ) { ) ); } + + diff --git a/xml/Menu/wci.xml b/xml/Menu/wci.xml index e1c7def..a3c9a8c 100644 --- a/xml/Menu/wci.xml +++ b/xml/Menu/wci.xml @@ -6,4 +6,10 @@ Create Widget access CiviCRM + + civicrm/wci/progress-bar/add + CRM_Wci_Form_ProgressBar + ProgressBar + access CiviCRM +