Giter Club home page Giter Club logo

xmpl-sdk's People

Contributors

anastasiiatsvetkova avatar basdanny avatar galkahana avatar michal7cohen avatar morenoraf avatar scouch1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xmpl-sdk's Issues

Issues with the sample SPA code and routing

I've been working with the sample code provided for the SPA and routing, and I can honestly say I had to make some changes to the .when() statements ordering to get the recipientID to work. I have a couple of other issues I'm working through with it now. I will precursor my issues with a statement that I am rather new to AngularJS, so some of my confusion is stemming from that.

First:
The site is routing to my main tracked page, but keeping tacking on #/Register on to the URL. No idea why.

Second:
I added custom directives to the site when I had it setup for individual pages, but they no longer work with the SPA code, I suspect because my ng-app has changed from xmp.app to spaApp. I tried switching the directives to use angular.module('spaApp').... but that was not successful.

I also tried adding "var xmpApp = angular.module('spaApp', ['ngRoute']);" to my custom directives file (just to try something), now all I get is an injector error.

*Note: this issue has been edited since my original posting, as originally I couldn't get the recipientID to look up at all.

Hidden field not submitting

When submitting a hidden input field, the value does not get committed to the database. No errors occur in uProduce or the browser, code sample below:

<input type="hidden" name="answerTotal" id="answerTotal" xmp-write-ador="xmp.r['answerTotal']" value="0">

Angular io (angular 2) compatibility

hi,

I'm a programmer and I'm working with angular 2. I was wondering if there was a module on its way for the new version or if I have to write it myself?

Thank you for your time!

Set default select option

When implementing a select input as in the example below Angular will output an extra option . Simply inputting selected or selected="selected" to the static option that you want as a default will not work.

1 2 3 4 5 6

Implementing as in the example below is the only workaround that could be found. A conditional statement is needed in the plan write ADOR to hijack the blank value.

1 2 3 4 5 6

Conditional Statement in Write Ador:

if (value = "")
{
|->[test] := AsNumber(1)
}
else
{
|->[test] := AsNumber(value)
}

A special xmp attribute for select input may be needed where a user can indicate default options or use or create a dynamic select with default. Or maybe these is a more elegant solution..??

See links below for Angular documentation for ngOptions and ngSelected

https://docs.angularjs.org/api/ng/directive/ngOptions
https://docs.angularjs.org/api/ng/directive/ngSelected

Register / update page

Sample site/registerAndUpdate.html

The approach outlined always results in a registration page, regardless of wether a user exists or not. I'm guessing this is because the page is Anonymous?

Update on Load with parseInt to increment visits

Your e.g. on https://github.com/XMPieLab/XMPL-SDK/wiki/Updating-Recipient-Data, Angular doesn't seems to evaluate parseInt to convert :

<xmp-update-on-page-load xmp-ador="xmp.r['Visited']" 
                         xmp-value="{{1 + parseInt(xmp.r['Visited'],10)}}"/>

I've found this :
http://stackoverflow.com/questions/26293769/how-to-parseint-in-angular-js
and

<xmp-update-on-page-load xmp-ador="xmp.r['Visited']" 
                         xmp-value="{{1 + (xmp.r['Visited']-0)}}"/>

seems to do the trick?

Error loading the data in the getting started

Hi,

I found a small error on the wiki page on the getting started. The scripts in the index.html should be in the header, not in the body in order for it to work. Here is a code snippet to replace the actual one:
`<!doctype html>

<title>Sample Recipient Page</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="https://ajax.xmcircle.com/ajax/libs/xmpl/1.9.1/xmp/js/xmp.min.js"></script> <script src="./xmpcfg.js"></script>
hello {{xmp.r['First Name']}} {{xmp.r['Last Name']}}
` on: https://github.com/XMPieLab/XMPL-SDK/wiki/Getting-Started

Let me know if the mystake is on my side or if I bring a good solution or not.

Thanks!

XMPL error

I am creating a page to send a card to some one its from an un personalised welcome page where the sender selects 1 out of 3 card to an unpersonalized page where the sender puts in the following information.

Own First and last name and email adres
and the firstname, last name and emal adres of the recipient.

Al these field need to be stored in a linked Excel database file when sender clicks the save button.

this page is based on the code of the register.html page from the sdk

But when i put in the asked info on the page and click send i get the following error

XMPL error
Error details
HTTP error data
Source:
url:
Result:
status:
data:
HTTP object
{}

Nothing more where am i doing things worng.

The code has been broken down to only one field
`<!doctype html>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="https://ajax.xmcircle.com/ajax/libs/xmpl/1.9.1/xmp/js/xmp.min.js"></script> <script src="./xmpcfg.js"></script>
Vul Alstublieft de gevraagdce gegevens hier onder in.
Email Kaart
			</div>
			<div>
		      <form xmp-register xmp-success-url="./dank.html">
		      	<ul>
		      		<li>
		        		 Voornaam Verzender :&nbsp &nbsp <input type="text" xmp-write-ador="xmp.r['Voornaam Verzender']"  size="30">
		        	</li>
		        </ul>
        		<input class="btn-primary" type="submit" value="save" xmp-tracking-action>
		      </form>				
			</div>
		</div>
	</div>
</div>

<script src="./deps/jquery/jquery-1.10.2.min.js"></script>
<script src="./deps/xmp/js/xmp.min.js"></script>
<script src="./xmpcfg.js"></script>
`

scope.xmp.recipientID

Hello,

Do you manage to actually run your code sample

scope.xmpReady(function () {
   scope.xmp.referredRecipient.ReferedByID = scope.xmp.recipientID;
});

or would it not more be

scope.xmp.**r.**recipientID;

instead?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.