Ionic2 gives nice template with left menu slider as per image:
Is there any NativeScript way of doing this with Angular2?
I installed npm i nativescript-telerik-ui in to the project and as per example http://docs.telerik.com/devtools/nativescript-ui/Controls/Angular/SideDrawer/getting-started pleased the html code in to my file :
<RadSideDrawer exampleTitle toggleNavButton>
<StackLayout tkDrawerContent class="sideStackLayout">
<StackLayout class="sideTitleStackLayout">
<Label text="Navigation Menu"></Label>
</StackLayout>
<StackLayout class="sideStackLayout">
<Label text="Primary" class="sideLabel sideLightGrayLabel"></Label>
<Label text="Social" class="sideLabel"></Label>
<Label text="Promotions" class="sideLabel"></Label>
<Label text="Labels" class="sideLabel sideLightGrayLabel"></Label>
<Label text="Important" class="sideLabel"></Label>
<Label text="Starred" class="sideLabel"></Label>
<Label text="Sent Mail" class="sideLabel"></Label>
<Label text="Drafts" class="sideLabel"></Label>
</StackLayout>
</StackLayout>
<StackLayout tkMainContent>
<Label [text]="mainContentText" textWrap="true" class="drawerContentText"></Label>
<Button text="OPEN DRAWER" (tap)=openDrawer()></Button>
</StackLayout>
</RadSideDrawer>
But once I run tns run android --emulator I can't see Deawer appeared on the screen.
Maybe you have forgotten to include the SIDEDRAWER_DIRECTIVES into the declarations of the bootstrapped #NgModule.
You can see full details on how to use RadSideDrawer or any of the other UI elements of the nativescript-telerik-ui plugin in your {N} + Angular application here. For specific details regarding the RadSideDrawer you can take a look at its official documentation here.
Related
hi i need to remove payment_address payment_method from checkout/checkout page Opencart 3.x.
i donot want extension, please some body help on this.
Theoretically, you can activate a COD payment method and then simply hide this step with basic CSS and a bit of JS to open the final step in the default checkout.
But Opencart heavily relies on Payment_address. Payment Address has several fields that are required like country, zone and often postcode.
Removing the payment_address will break the whole system. What you can do is via simple HTML and CSS, populate the fields with default values and then hide with CSS.
for example in catalog/view/theme/default/template/checkout/payment_address.twig
...html
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-firstname">{{ entry_firstname }}</label>
<div class="col-sm-10">
<input type="text" name="firstname" value="<MY_DEFAULT_FIRST_NAME>" placeholder="{{ entry_firstname }}" id="input-payment-firstname" class="form-control" />
</div>
</div>
...
do this for all the fields.
then in catalog/view/theme/default/template/checkout/checkout.twig do style="display:none'
<div class="panel panel-default" style="display:none">
<div class="panel-heading">
<h4 class="panel-title">{{ text_checkout_account }}</h4>
</div>
<div class="panel-collapse collapse" id="collapse-payment-address">
<div class="panel-body"></div>
</div>
</div>
{% else %}
<div class="panel panel-default" style="display:none">
<div class="panel-heading">
<h4 class="panel-title">{{ text_checkout_payment_address }}</h4>
</div>
<div class="panel-collapse collapse" id="collapse-payment-address">
<div class="panel-body"></div>
</div>
</div>
this will just hide the payment_address block but it will still be there.
and now you need to skip the payment address step by calling the Continue button via JavaScript
so in the same file catalog/view/theme/default/template/checkout/checkout.twig
after line 165
$('a[href=\'#collapse-payment-address\']').trigger('click');
//add this code to trigger continue button:
$('#button-payment-address').trigger('click');
You might need to wrap the trigger click action with setTimeout becuase you might trigger the click before the form is actually loaded.
I would also advise to do this in a CUSTOM theme folder, and not in the default opencart theme. this way you can do the modifications without touching the core file.
Please tell me how to remove checkout fields from checkout page of default theme in opencart version 3.0.3.2. For example i want to remove company postcode..
[100% : SOLVED]
File Pathe 1 :
catalog\view\theme\default\template\checkout\payment_address.twig
File Pathe 2
:catalog\view\theme\default\template\checkout\shipping_address.twig
You Find this code
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-payment-postcode">{{ entry_postcode }}</label>
<div class="col-sm-10">
<input type="text" name="postcode" value="" placeholder="{{ entry_postcode }}" id="input-payment-postcode" class="form-control" />
</div>
</div>
And Remove it.
i hope it's working for you. If you are appreciate with my answer. please up-vote it. because it's very important for me.
Thanks for Advance...
Recently i update my existing ember ember project to 2.10.0 version after update i try to run the project but it shows some compile error
uncaught Error: Compile Error: bs-form-element is not a helper
I include this in login page on my project like this
<div class="panel-body">
{{#bs-form formLayout="vertical" model=this action="loginAction" class="form-signin"}}
<fieldset>
{{bs-form-element controlType="text" placeholder="Bank ID" property="userid" value=userid elementId="userid" required="required" autofocus="autofocus" style="text-align:left" maxlength="7"}}
{{bs-form-element controlType="password" placeholder="Password" property="password" value=password elementId="password" required="required" style="text-align:left" maxlength="10"}}
<!--div class="checkbox">
<label>
<input name="remember" type="checkbox" value="Remember Me">Remember Me
</label>
</div-->
{{bs-button defaultText="Login" class="btn btn-lg btn-primary btn-block" buttonType="submit" }}
</fieldset>
{{/bs-form}}
</div>
I am not sure whether this is plugin related issue or something could some one please help to sort this issue
Ember throws this error if there is no component or helper with the given name found in your project or your dependent addon's.
Check your package.json and the version of ember-bootstrap. I think your app used pre 1.0, because bs-form-element is old api.
Maybe the addon was updated accidentally to >= 1.0, while updating ember.
Another possible oversight to check for, specific to ember-bootstrap and black/white lists, is accidentally including or excluding the needed component from the black/white lists. For example, if you're using a whitelist, make sure the needed component is referenced in it:
// ember-cli-build.js
'ember-bootstrap': {
'whitelist': [
'bs-form'
],
}
I downloaded and deployed the loan-approval tutorial but everytime I want to start an instance: Form failure: Not Found
any idea what could be wrong?
server 7.5.0 with tomcat on OS X -- nothing configured, all standard.. as by the tutorial
You should check that the request-loan.html file, which should look like this:
<form name="requestLoan">
<div class="form-group">
<label for="customerId">Customer ID</label>
<input class="form-control"
cam-variable-type="String"
cam-variable-name="customerId"
name="customerId" />
</div>
<div class="form-group">
<label for="amount">Amount</label>
<input class="form-control"
cam-variable-type="Double"
cam-variable-name="amount"
name="amount" />
</div>
</form>
Is located in the src/main/webapp/forms folder.
Like is written here
I am switching from Django Crispy Forms to Floppy Forms, but my desired Bootstrap styling appears to be lost; now it just looks like a plain unstyled form.
Crispy
Here is what I had with Crispy Forms's Bootstrap template pack:
Here was the generated source:
<div id="div_id_sent_amount" class="form-group has-error">
<label for="id_sent_amount" class="control-label requiredField">How much would you like to give?
<span class="asteriskField">*</span>
</label>
<div class="controls ">
<select class="select form-control" id="id_sent_amount" name="sent_amount"><option value="" selected="selected">---------</option><option value="0.00">$0.00</option><option value="0.05">$0.05</option><option value="0.10">$0.10</option></select>
<span id="error_1_id_sent_amount" class="help-block"><strong>This field is required.</strong></span></div>
</div>
Floppy
Here is what I get with Floppy using the Bootstrap layout here.
Here is the generated source:
<div class="form-group error">
<label class="col-sm-4 control-label" for="id_sent_amount">Sent amount <span class="required">*</span>:</label>
<div class="controls col-sm-8 field-sent_amount">
<select id="id_sent_amount" name="sent_amount">
<option value="" selected="selected">---------</option>
<option value="0.00">$0.00</option>
<option value="0.05">$0.05</option>
<option value="0.10">$0.10</option>
</select>
<ul class="errorlist"><li>This field is required.</li></ul>
</div><!--- .controls -->
Any ideas on what I am missing?
floppyforms just provides easier layout and widget control, it does not automatically enable bootstrap styling.
For that, you have to do a bit of work as detailed in the documentation.
In summary, you have to create these templates:
floppyforms/templates/floppyforms/layouts/bootstrap.html
floppyforms/templates/floppyforms/rows/bootstrap.html
floppyforms/templates/floppyforms/layouts/default.html
floppyforms/templates/floppyforms/errors.html
Fill them with bootstrap-specific styling (examples are provided in the documentation).
Keep in mind the examples are for an older version of bootstrap; you might want to update the templates with the current version of bootstrap.
You can edit the templates by hand to bring them up to date, or use django-floppyforms-bootstrap3 which does exactly what it says - updates the templates for bootstrap3 compatibility.