XML file content changed in iOS? - ios

I want to download xml file from url. I upload my xml file to google drive and share that file in public.
content of file is
<testapp><welcomePage><logoimage>mspeller</logoimage>
<titleBackgroudColor>yellow</titleBackgroudColor><aboutUsIcon>Speller</aboutUsIcon><allitemIcon>Speller</allitemIcon><welBackgroundcolor>red</welBackgroundcolor>
</welcomePage>
<user><userName>mgdan</userName><firstName>Mila</firstName><lastName>Gdan</lastName>
</user></testapp>
I am downloading this file using url
NSURL *url = [NSURL URLWithString:#"https://drive.google.com/file/d/0B-3M5xTcGgbLYlAxR1Vqa3dRMkU/edit?usp=sharing"];
NSData *data = [NSData dataWithContentsOfURL:url]; // Load XML data from web
NSString *applicationDocumentsDir =
[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSString *storePath = [applicationDocumentsDir stringByAppendingPathComponent:#"config.xml"];
// write to file atomically (using temp file)
[data writeToFile:storePath atomically:TRUE];
But the downloaded xml is look like this It returns full raw data from google what i am doing wrong
<!DOCTYPE html>
<html>
<head>
<meta content="notranslate" name="google">
<meta content="IE=edge;" http-equiv="X-UA-Compatible">
<meta content="!" name="fragment">
<title>Configuration.xml - Google Drive</title>
<style type="text/css">
#gbar,#guser{font-size:13px;padding-right:8px;padding-top:4px !important;}#gbar{padding-left:8px;height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}#media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
</style>
<script>
_docs_flag_initialData={"jobset":"prod","docs-aiiws":"docs_warm_nf","info_params":{},"uls":"","icso":false,"docs_eoal":true,"docs_oogt":"NONE","docosEmbedApiJs":"\/\/docs.google.com\/comments\/d\/AAHRpnXsdSRJZ13fxD9ua--NCPBLpfm_dXJQy6rzoRrqyXgd3mTwXptKPl7zGQiWOqXq6aNam3ciYM4NHJ_Yrw4pg12iznl3KqA\/api\/js?hl=en_GB","docosUnreadCommentsEnabled":false,"docs-egc":true,"docs-chat_base_url":"talkgadget.google.com\/talkgadget\/","docs-chat_domain_rotation":true,"docs-ce":true,"docs-ut":2,"promo_url":"","promo_title":"","promo_title_prefix":"","promo_content_html":"","promo_element_id":"","promo_orientation":1,"promo_show_on_click":false,"promo_show_on_load":false,"show_promo":false,"docs-encp":false,"buildLabel":"texmex_2013-49-Thu_RC1","buildClNumber":"57718063","debugTask":"oa_66","docs-show_debug_info":false,"dcau":"https:\/\/chrome.google.com\/webstore\/detail\/apdfllckaahabafndbhieahigkjlhalf","ondlburl":"\/\/docs.google.com","drive_url":"\/\/drive.google.com","docs-sup":"\/file","docs-uptc":["lsrp","usp","urp","utm_source","utm_medium","utm_campaign","utm_term","utm_content"],"docs-cwsd":"","docs-al":[0,1,0,1,0]
,"docs-ndt":"Untitled Texmex","docs-eit":false,"docs-spfe":true,"docs-mriim":1800000,"docs-ecc":false,"docs-mnumea":false,"docs-ess":false,"ecbsl":true,"ecid":true,"eod":true,"docs-eilb":false,"docs-pedd":true,"docs- evr":true,"docs-eir":false,"docs-enmr":false,"docs-esrd":false,"share_ui":"jfk","server_time_ms":1387864935483,"gaia_session_id":"","enable_iframed_embed_api":true,"cup":"\/folder\/d\/{folderId}\/edit","docs-fut":"\/\/docs.google.com\/#folders\/{folderId}","esid":true,"esubid":false,"docs-etbs":true,"enable_kennedy":true,"onePickImportDocumentUrl":"","opbu":"https:\/\/docs.google.com\/picker","opru":"https:\/\/docs.google.com\/relay.html","opdu":false,"ophi":"texmex","opuci":"","docs-se":false,"docs-ebcrsct":false,"docs-iror":false,"xdbcmUri":"https:\/\/docs.google.com\/file\/xdbcm.html?pli=1","xdbcfAllowXpc":true,"docs-corsbc":false,"xdbcfAllowHostNamePrefix":true,"docs-spdy":false,"enable_client_docos":true,"enable_anchored_docos":true,"enable_docos_tickle":true,"gv_int_native":true,"enable_a11y":true,"tpc":true,"enable_pinned_revisions":false,"enable_edit_blob_revisions":false,"upload_url":"https:\/\/docs.google.com\/upload\/resumableupload","enable_toolbar":true,"enable_feedback_button":false,"enable_microscope":true,"enable_manage_timed_text":true,"video_embed_type":"PREFER_FLASH","enable_maps_embed":true,"maps_api_uri":"https:\/\/maps.googleapis.com\/maps\/api\/js?key=AIzaSyBCjpnguVjzi6vS67NdBtyYuvCYz3yBxCY&sensor=false","maps_display_uri":"https:\/\/maps.google.com\/maps","docs_abuse_link":"https:\/\/docs.google.com\/abuse?id=0B-3M5xTcGgbLYlAxR1Vqa3dRMkU","enable_csi":true,"csi_service_name":"texmex","third_party_default_icon_urls":{"icon16":"\/\/ssl.gstatic.com\/docs\/doclist\/images\/generic_app_icon_16.png","icon32":"\/\/ssl.gstatic.com\/docs\/doclist\/images\/generic_app_icon_32.png","icon64":"\/\/ssl.gstatic.com\/docs\/doclist\/images\/generic_app_icon_64.png","icon128":"\/\/ssl.gstatic.com\/docs\/doclist\/images\/generic_app_icon_128.png"},"enable_chrome_webstore_link":true};
</script>
<script type="text/javascript">
(function(){(function(){function e(a){this.t={};this.tick=function(a,c,b){var d=void 0!=b?b:(new Date).getTime();this.t[a]=[d,c];if(void 0==b)try{window.console.timeStamp("CSI/"+a)}catch(e){}};this.tick("start",null,a)}var a;window.performance&&(a=window.performance.timing);var f=a?new e(a.responseStart):new e;window.jstiming={Timer:e,load:f};if(a){var c=a.navigationStart,d=a.responseStart;0<c&&d>=c&&(window.jstiming.srt=d-c)}if(a){var b=window.jstiming.load;0<c&&d>=c&&(b.tick("_wtsrt",void 0,c),b.tick("wtsrt_",
"_wtsrt",d),b.tick("tbsd_","wtsrt_"))}try{a=null,window.chrome&&window.chrome.csi&&(a=Math.floor(window.chrome.csi().pageT),b&&0<c&&(b.tick("_tbnd",void 0,window.chrome.csi().startE),b.tick("tbnd_","_tbnd",c))),null==a&&window.gtbExternal&&(a=window.gtbExternal.pageT()),null==a&&window.external&&(a=window.external.pageT,b&&0<c&&(b.tick("_tbnd",void 0,window.external.startE),b.tick("tbnd_","_tbnd",c))),a&&(window.jstiming.pt=a)}catch(g){}})();})();
</script>
<link href="/static/file/client/css/1508097430-edit_css_ltr.css" rel=
"stylesheet">
<link href=
"https://ssl.gstatic.com/docs/doclist/images/icon_11_generic_favicon.ico"
rel="shortcut icon">
<link href=
"https://chrome.google.com/webstore/detail/apdfllckaahabafndbhieahigkjlhalf"
rel="chrome-webstore-item">
<meta content="Configuration.xml">
<meta content=
"https://ssl.gstatic.com/docs/doclist/images/icon_11_generic_favicon.ico">
<meta content=
"https://docs.google.com/file/d/0B-3M5xTcGgbLYlAxR1Vqa3dRMkU/edit?usp=sharing&pli=1">
</head>
<body dir="ltr" onload='_onload()'>
<noscript>
<div class="docs-butterbar-container">
<div class="docs-butterbar-wrap">
<div class=
"jfk-butterBar jfk-butterBar-shown jfk-butterBar-warning">
JavaScript isn't enabled in your browser, so this file can't be
opened. Enable and reload.
</div>
</div><br>
</div></noscript>
<div class="docs-vis-ref-chrome" id="docs-chrome" tabindex="0">
<div>
<div id="docs-header">
<div class="docs-branding-default" id=
"docs-branding-container">
<a href="//drive.google.com" target="_blank" title=
"Open Google Drive"></a>
<div id="docs-drive-logo"></div>
<div id="docs-branding-logo"></div>
</div>
<div id="gbar">
<nobr><a class="gb1" href=
"https://www.google.co.in/webhp?tab=ow" target=
"_blank">Search</a> <a class="gb1" href=
"http://www.google.co.in/imghp?hl=en-GB&tab=oi" target=
"_blank">Images</a> <a class="gb1" href=
"https://maps.google.co.in/maps?hl=en-GB&tab=ol"
target="_blank">Maps</a> <a class="gb1" href=
"https://play.google.com/?hl=en-GB&tab=o8" target=
"_blank">Play</a> <a class="gb1" href=
"https://www.youtube.com/?tab=o1" target=
"_blank">YouTube</a> <a class="gb1" href=
"https://mail.google.com/mail/?tab=om" target=
"_blank">Gmail</a> <b class="gb1">Drive</b> <a class="gb1"
href="https://www.google.com/calendar?tab=oc" target=
"_blank">Calendar</a> <a class="gb1" href=
"http://www.google.co.in/intl/en-GB/options/" style=
"text-decoration:none" target="_blank"><span style=
"text-decoration: underline">More</span> »</a></nobr>
</div>
<div id="guser">
<nobr><span class="gbi" id="gbn"></span><span class="gbf"
id="gbf"></span><span id="gbe"><a class="gb4" href=
"https://docs.google.com/abuse?id=0B-3M5xTcGgbLYlAxR1Vqa3dRMkU"
target='_blank'>Report abuse</a> |</span> <a class="gb4"
href="https://docs.google.com/settings" target=
'_blank'>Settings</a> | <a class="gb4" href=
"https://www.google.com/accounts/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/file/d/0B-3M5xTcGgbLYlAxR1Vqa3dRMkU/edit?usp%3Dsharing%26pli%3D1&followup=https://docs.google.com/file/d/0B-3M5xTcGgbLYlAxR1Vqa3dRMkU/edit?usp%3Dsharing%26pli%3D1"
id="gb_70" target="_top">Sign in</a></nobr>
</div>
<div class="gbh" style="left:0"></div>
<div class="gbh" style="right:0"></div>
<div style="clear:both"></div>
<div id="docs-titlebar-container">
<div id="docs-titlebar">
<div class="docs-title-outer">
<div class="docs-title-widget goog-inline-block"
id="docs-title-widget">
<span class="docs-title" id=
"docs-title"></span>
<div class="docs-title-inner" id=
"docs-title-inner">
<span class="docs-title" id=
"docs-title">Configuration.xml</span>
</div>
</div>
<div class="docs-star-container goog-inline-block">
<div class="goog-inline-block" id="docs-star"
style="display:none"></div>
</div>
<div class=
"docs-activity-indicator-container goog-inline-block">
</div>
</div>
</div>
<div class="docs-titlebar-buttons">
<div class="goog-inline-block docs-titlebar-button" id=
"docs-presence-container">
<div class="goog-inline-block" id="docs-presence">
</div>
<div class=
"goog-inline-block jfk-button jfk-button-standard jfk-button-narrow docs-chat jfk-button-disabled"
id="docs-chat" style="display: none">
<div class="docs-icon goog-inline-block">
<div class=
"docs-icon-img-container docs-icon-img docs-icon-chat">
</div>
</div>
</div>
</div>
<div class="goog-inline-block">
<div class=
"goog-inline-block jfk-button jfk-button-standard docs-titlebar-button jfk-button-disabled"
id="docs-docos-commentsbutton">
Comments
</div>
<div id="docs-docos-caret" style="display: none">
<div class="docs-docos-caret-outer"></div>
<div class="docs-docos-caret-inner"></div>
</div>
</div><span class="goog-inline-block" id=
"docs-titlebar-share-client-button"></span>
<div class=
"goog-inline-block jfk-button jfk-button-action docs-titlebar-button jfk-button-disabled">
<span class="goog-inline-block" id=
"docs-titlebar-share-client-button"><span class=
"goog-inline-block apps-share-sprite scb-button-icon scb-unlisted-icon-white">
</span>Share</span>
</div>
</div>
</div>
</div>
<div class="docs-butterbar-container">
<div class="docs-butterbar-wrap">
<div class=
"jfk-butterBar jfk-butterBar-shown jfk-butterBar-info">
You are using an unsupported browser. Some features may
not work correctly. Upgrade to a <a class=
"docs-butterbar-link-no-pad" href=
"http://whatbrowser.org" target="_blank">modern
browser</a>, such as <a class=
"docs-butterbar-link-no-pad" href=
"https://www.google.com/chrome/?&brand=CHVN&utm_campaign=en&utm_source=en-et-na-us-docs-ug&utm_medium=et"
target="_blank">Google Chrome</a>.<a class=
"docs-butterbar-link" href="#" onclick=
"this.parentNode.parentNode.removeChild(this.parentNode);return false;">Dismiss</a>
</div>
</div><br>
</div>
</div>
<div id="docs-bars">
<div id="docs-menubars">
<div class=
"docs-menubar goog-container goog-container-horizontal" id=
"docs-menubar" tabindex="0">
<div class=
"menu-button goog-control goog-control-disabled goog-inline-block"
id="docs-file-menu">
File
</div>
<div class=
"menu-button goog-control goog-control-disabled goog-inline-block"
id="docs-edit-menu">
Edit
</div>
<div class=
"menu-button goog-control goog-control-disabled goog-inline-block"
id="docs-view-menu">
View
</div>
<div class=
"menu-button goog-control goog-control-disabled goog-inline-block"
id="docs-help-menu">
Help
</div>
</div>
<div class="docs-offscreen" id="docs-chat-message-a11y" style=
"height: 0; width: 0; overflow: hidden"></div>
<div id="docs-presence-menubar"></div>
</div>
<div id='docs-toolbar-wrapper'>
<div class="docs-collapsable-toolbar" id=
'docs-primary-toolbars'>
<div class="goog-toolbar" id="docs-toolbar">
<div class=
"goog-toolbar-button goog-inline-block goog-toolbar-button-disabled"
id="downloadToolbarButton">
<div class=
"goog-toolbar-button-outer-box goog-inline-block">
<div class=
"goog-toolbar-button-inner-box goog-inline-block">
<div class="docs-icon goog-inline-block">
<div class=
"docs-icon-img-container docs-icon-img docs-icon-download">
</div>
</div>
</div>
</div>
</div>
<div class=
"goog-toolbar-button goog-inline-block goog-toolbar-button-disabled"
id="printToolbarButton">
<div class=
"goog-toolbar-button-outer-box goog-inline-block">
<div class=
"goog-toolbar-button-inner-box goog-inline-block">
<div class="docs-icon goog-inline-block">
<div class=
"docs-icon-img-container docs-icon-img docs-icon-print">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="goog-toolbar" id="docs-side-toolbar">
<div class=
"goog-toolbar-button goog-inline-block goog-toolbar-button-disabled"
id="webstoreToolbarButton">
<div class=
"goog-toolbar-button-outer-box goog-inline-block">
<div class=
"goog-toolbar-button-inner-box goog-inline-block">
<div class="docs-icon goog-inline-block">
<div class=
"docs-icon-img-container docs-icon-img docs-icon-chrome-store">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="docs-help-anchor-wrapper">
<div id="docs-help-anchor"></div>
<div id="docs-help-anchor-right"></div>
</div>
<div id="docs-additional-bars"></div>
</div>
<div class="docs-vis-ref-editor-container" id="docs-editor-container">
<div id="docs-editor" tabindex="1">
<div class="texmex-nopreview texmex-norender">
<div class="texmex-nopreview-img"><img alt=
"No preview available" src=
"https://ssl.gstatic.com/docs/doclist/images/nopreview_blank.png"></div>
<div class="texmex-nopreview-msg">
<div>
No preview available
</div><span id="texmex-nopreview-download-span" style=
"display:none"></span>
<div class=
"goog-inline-block jfk-button jfk-button-standard texmex-nopreview-download"
tabindex="0">
<span id="texmex-nopreview-download-span" style=
"display:none"></span>
</div>
</div>
</div>
<div class="texmex-desc-container" id=
"texmex-description-container" style="display: none">
<div>
<div class="texmex-text-container" id=
"texmex-text-container">
<span class=
"texmex-contents-desc-none description_text" id=
"texmex-nodescription">Enter a description</span>
</div>
</div><span class=
"texmex-description-edit-icon goog-inline-block" id=
"texmex-description-edit-icon">
</div>
</div>
</div><script src="/static/file/client/js/3569332580-edit_core__en_gb.js"
type="text/javascript"></script>
</body>
</html>

The download url should be https://doc-10-a4-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/87pq5ptr7ncrrd8iqnu0ep6td4f4ca8q/1387864800000/06809471879824913322/*/0B-3M5xTcGgbLYlAxR1Vqa3dRMkU?h=16653014193614665626&e=download
https://drive.google.com/file/d/0B-3M5xTcGgbLYlAxR1Vqa3dRMkU/edit?usp=sharing is a web page.

Related

Bootstrap gutter class gx-5 isn't working horizontally

I want some gaps between my cards horizontally. But when I am adding gx-5 bootstrap 5 class, it's not taking any gap horizontally. here is my code below.
<div className="container">
<div className="row gx-5">
{myProducts.map((product) => (
<div
key={product._id}
class="card col-sm-12 col-md-4 "
style={{ boxShadow: "rgba(0, 0, 0, 0.24) 0px 3px 8px" }}
>
<img class="card-img-top img-fluid" src={product.image} alt="" />
<div class="card-body">
<h5 class="card-title">{product.name}</h5>
<p class="card-text">{product.description}</p>
</div>
</div>
))}
</div>
</div>
Is anyone there to help me, please?
Try this card snippet out:
<div class="col-sm-12 col-md-4">
<div class="card">
<img class="card-img-top" src="..." alt="..." />
<div class="card-body">
<h5 class="card-title">Product</h5>
<p class="card-text">Product</p>
</div>
</div>
</div>
Explanation:
I just nested a new card div inside the column because card class affects how Boostrap manages the gutters.
A working example:
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row gx-5">
<div class="col-sm-12 col-md-4">
<div class="card">
<img class="card-img-top" src="https://media.istockphoto.com/photos/forest-wooden-table-background-summer-sunny-meadow-with-green-grass-picture-id1353553203?b=1&k=20&m=1353553203&s=170667a&w=0&h=QTyTGI9tWQluIlkmwW0s7Q4z7R_IT8egpzzHjW3cSas=" alt="" />
<div class="card-body">
<h5 class="card-title">Product 01</h5>
<p class="card-text">Product 01 description</p>
</div>
</div>
</div>
<div class="col-sm-12 col-md-4">
<div class="card">
<img class="card-img-top" src="https://media.istockphoto.com/photos/forest-wooden-table-background-summer-sunny-meadow-with-green-grass-picture-id1353553203?b=1&k=20&m=1353553203&s=170667a&w=0&h=QTyTGI9tWQluIlkmwW0s7Q4z7R_IT8egpzzHjW3cSas=" alt="" />
<div class="card-body">
<h5 class="card-title">Product 01</h5>
<p class="card-text">Product 01 description</p>
</div>
</div>
</div>
<div class="col-sm-12 col-md-4">
<div class="card">
<img class="card-img-top" src="https://media.istockphoto.com/photos/forest-wooden-table-background-summer-sunny-meadow-with-green-grass-picture-id1353553203?b=1&k=20&m=1353553203&s=170667a&w=0&h=QTyTGI9tWQluIlkmwW0s7Q4z7R_IT8egpzzHjW3cSas=" alt="" />
<div class="card-body">
<h5 class="card-title">Product 01</h5>
<p class="card-text">Product 01 description</p>
</div>
</div>
</div>
</div>
</div>
Note: I converted the code snippet into plain HTML please consider converting it back to its original state without changing the classes.

Ionic 4: Side menu (ion-menu) does not close properly in IOS

I am developing an application with IONIC 4 for android and IOS.
I add a side menu (ion-menu), it works perfectly on android.
But in IOS it is giving me problems, the menu opens perfectly. But when I want to close the menu. Graphically the menu closes, but when I try to interact with the application, only the options within the side menu are activated.
Only the side menu items are useful, the rest of the application is canceled.
This is the process.
Main page normally:
I open the side menu:
I close the menu:
All this options gets blocked:
But this options still are activated, even though the menu has been hidden.
This only happen in IOS, my specifications:
My code:
<ion-menu side="start" content-id="main-content">
<ion-header class="headermenu">
<div class="spacioemenuleft">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:center;">
<img alt="logo" style="width:18.9vw; height:10.6vh; border-radius: 50%;" src="{{pictureusuariomenu}}" >
</div> </div> </div>
</div>
<div class="spacioemenuright">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div class="textsaldo2" [innerHTML]="fullname"></div>
<div class="bloque">
<div style="float:left; width:70%; height:100%" class="textsaldo2">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:center;">
PIN: {{pinusuario}}
</div> </div> </div>
</div>
<div style="float:right; width:30%; height:100%; background-color:white;" (click)="copyText()">
<img alt="logo" style="width:100%; height:100%" src="assets/imgs/compartir-b.png" >
</div>
</div>
<span class="error ion-padding" style="color:white; font-weight:bold; margin-top:1em; padding-top:0em;" *ngIf="registrado">
PIN COPIADO!!!
</span>
</div>
</div>
</div>
</ion-header>
<ion-content >
<div class="ion-padding">
<div class="espacio2 margenboton" routerLink="/recargarsaldo">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:center;">
Recargar Saldo
</div> </div> </div>
</div>
<ion-list>
<ion-item>
<div style="float:left; width:20%; height:100%; padding:0.8em;" routerLink="/profile">
<img alt="logo" style="width:2.7vh; height:2.7vh;" src="assets/imgs/perfil.png" >
</div>
<div style="float:left; width:80%; height:100%;" class="textblue2" routerLink="/profile">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:left;">
Mi perfil
</div> </div> </div>
</div>
</ion-item>
<ion-item>
<div style="float:left; width:20%; height:100%; padding:0.8em;" routerLink="/notificaciones">
<img alt="logo" style="width:2.7vh; height:2.7vh;" src="assets/imgs/11notificaciones.png" >
</div>
<div style="float:left; width:80%; height:100%;" class="textblue2" routerLink="/notificaciones">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:left;">
Notificaciones
</div> </div> </div>
</div>
</ion-item>
<ion-item>
<div style="float:left; width:20%; height:100%;padding:0.8em;" routerLink="/misretiros" >
<img alt="logo" style="width:2.7vh; height:2.7vh;" src="assets/imgs/6dolares.png" >
</div>
<div style="float:left; width:80%; height:100%;" class="textblue2" routerLink="/misretiros">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:left;">
Mis retiros
</div> </div> </div>
</div>
</ion-item>
<ion-item>
<div style="float:left; width:20%; height:100%; padding:0.8em;" routerLink="/historial">
<img alt="logo" style="width:2.7vh; height:2.7vh;" src="assets/imgs/11historial.png" >
</div>
<div style="float:left; width:80%; height:100%;" class="textblue2" routerLink="/historial">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:left;">
Historial
</div> </div> </div>
</div>
</ion-item>
<ion-item>
<div style="float:left; width:20%; height:100%; padding:0.8em;" routerLink="/contacto">
<img alt="logo" style="width:2.7vh; height:2.7vh;" src="assets/imgs/contact5.png" >
</div>
<div style="float:left; width:80%; height:100%;" class="textblue2" routerLink="/contacto">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:left;">
Contáctanos
</div> </div> </div>
</div>
</ion-item>
<ion-item>
<div style="float:left; width:20%; height:100%; padding:0.8em;">
<img alt="logo" style="width:2.7vh; height:2.6vh;" src="assets/imgs/7cerrar.png" >
</div>
<div style="float:left; width:80%; height:100%;" class="textblue2">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:left;" (click)="cerrarsession();" >
Cerrar sesión
</div> </div> </div>
</div>
</ion-item>
</ion-list>
</div>
<div style="height: 15vh; background-color:#F3F3F3; padding:0.2em;">
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:center;" >
<div style="float:left; width:40%; height:100%;" >
<div style="display:table;width:100%;height:100%;">
<div style="display:table-cell;vertical-align:middle;">
<div style="text-align:right;">
<p class="textblue2" style="font-weight:bold;">En alianza con:</p>
</div> </div> </div>
</div>
<div style="float:left; width:60%; height:100%; padding:0.1em; padding-top: 0.6em;" >
<img alt="logo" style="width:80%; height:auto" src="assets/imgs/Grupo517.png" >
</div>
</div> </div> </div>
</div>
</ion-content>
</ion-menu>
Any ideas?
<IonContent>
... other page components
{ authenticated ? <Menu/> : null }
</IonContent>
or what i have done in my example is not even render the router code that contains the menu when the user isn't authenticated
if (!authInfo || !authInfo.initialized) {
return (
<IonApp>
<IonLoading isOpen={true} />
</IonApp>
);
} else {
return (
<IonApp>
<>
{authInfo?.loggedIn === true ? (
<IonReactRouter>
<IonSplitPane contentId="main">
<Menu />
<IonRouterOutlet id="main">
<Route path="/page/:name" component={Page} exact />
<Route path="/tabs" component={TabRootPage} />
<Redirect from="/" to="/tabs" exact />
</IonRouterOutlet>
</IonSplitPane>
</IonReactRouter>
) : (
<IonReactRouter>
<Route
path="/create-account"
component={CreateAccountPage}
exact
/>
<Route path="/login" component={LoginPage} exact />
<Redirect from="/" to="/login" exact />
</IonReactRouter>
)}
</>
</IonApp>
);
}
See full app and source code here : https://github.com/aaronksaunders/ionic-sidemenu-tabs-auth-starter

AntD Carousel only displays the first div in it

This is the Carousel gist from my code.
<Carousel arrows={true}>
<div className='new-offers-item'>
<div className='new-offers-item-bg'>
<div className='new-offers-item-rent-tag'>TEXT HERE</div>
<div className='new-offers-item-favourite' />
<div className='new-offers-posted-at'>ANOTHER TEXT HERE, 10:44</div>
</div>
<div className='new-offers-item-location-rate'>
<div className='new-offers-item-location'>street address, 5<br />CC Espiral,<br /> 1 floor</div>
<div className='new-offers-item-rate'>
<div>
<span className='new-offers-item-rate-value'>240 000 </span>
<span className='new-offers-item-rate-unit'>abcd.</span>
</div>
</div>
</div>
<div className='new-offers-item-city-street'>
<span>City</span>
<span> </span>
<span>Address1</span>
</div>
<div className='new-offers-item-description'>
<div className='new-offers-item-description-row'>
<div className='new-offers-item-description-row-space'>
<div className='new-offers-item-description-row-space-division'>
<div>
<img src={sqM} />
</div>
<p>
<span>Total</span>
<span>600</span>
</p>
<p>
<span> </span>
<span className='span-divider'>/</span>
</p>
<p>
<span>Sale</span>
<span>300</span>
</p>
</div>
<div className='new-offers-item-description-row-metre-rate'>
<p>
<span>Per meter</span>
</p>
<p>
<span>6 700 </span>
<span>unit<sup>2</sup></span>
</p>
</div>
</div>
<div className='new-offers-item-description-row'>
<div className='new-offers-item-description-row-space'>
<div className='new-offers-item-description-row-space-division'>
<div className='new-offers-item-description-second'>
<img src={bldgIcon} />
<span className='item-type'>Торговый центр</span>
</div>
</div>
<div className='new-offers-item-description-row-metre-rate'>
<div className='new-offers-item-description-second'>
<img src={doorsIcon} />
<span className='item-type'>10 floor</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div className='new-offers-item'>
<div className='new-offers-item-bg'>
<div className='new-offers-item-rent-tag'>TEXT HERE</div>
<div className='new-offers-item-favourite' />
<div className='new-offers-posted-at'>ANOTHER TEXT HERE, 10:44</div>
</div>
<div className='new-offers-item-location-rate'>
<div className='new-offers-item-location'>street address, 5<br />CC Espiral,<br /> 1 floor</div>
<div className='new-offers-item-rate'>
<div>
<span className='new-offers-item-rate-value'>240 000 </span>
<span className='new-offers-item-rate-unit'>abcd.</span>
</div>
</div>
</div>
<div className='new-offers-item-city-street'>
<span>City</span>
<span> </span>
<span>Address1</span>
</div>
<div className='new-offers-item-description'>
<div className='new-offers-item-description-row'>
<div className='new-offers-item-description-row-space'>
<div className='new-offers-item-description-row-space-division'>
<div>
<img src={sqM} />
</div>
<p>
<span>Total</span>
<span>600</span>
</p>
<p>
<span> </span>
<span className='span-divider'>/</span>
</p>
<p>
<span>Sale</span>
<span>300</span>
</p>
</div>
<div className='new-offers-item-description-row-metre-rate'>
<p>
<span>Per meter</span>
</p>
<p>
<span>6 700 </span>
<span>unit<sup>2</sup></span>
</p>
</div>
</div>
<div className='new-offers-item-description-row'>
<div className='new-offers-item-description-row-space'>
<div className='new-offers-item-description-row-space-division'>
<div className='new-offers-item-description-second'>
<img src={bldgIcon} />
<span className='item-type'>Торговый центр</span>
</div>
</div>
<div className='new-offers-item-description-row-metre-rate'>
<div className='new-offers-item-description-second'>
<img src={doorsIcon} />
<span className='item-type'>7 floor</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</Carousel>
Only the first div.new-offers-item gets displayed.
How do I get the second one and others to display?
Since antd using slick slider for their Carousel, you should refer to their API
To be more precise, you will need to use prop: "slidesToShow" in order to show the numbers of slides that you need.
For Example:
const settings = {
dots: true,
slidesToShow: 3,
slidesToScroll: 1
};
It is as designed. This shows the first item as current and to move to the next item, you can click on the navigation.
You can set the background of new-offers-item to see the navigation. You can refer to the example here:
https://codesandbox.io/s/nn44020wzp
This is the soultion that produced the desired outcome. Added 2 more
.new-offers-item.
const carouselSettings = {
arrows: true,
slidesToShow: 3,
slidesToScroll: 1
};
Then add the const carouselSettings to the Carousel component:
<Carousel {...carouselSettings}>...</Carousel>.
Based on react-slick docs and playground at https://github.com/akiran/react-slick.
AntD Carousel doesn't place the arrows to the html layout when the number of items inside the Carousel equals to slidesToShow. The arrows which are buttons are transparent by default you'd need to put an arrow image inside the buttons. The css classes for buttons are .ant-carousel .slick-prev and .ant-carousel .slick-next.

Jquery How to like switch to next tab in ASP MVC5

I have a view like this
View Code:-
<div class="col-md-3" style="background-color:white" id="Tabs">
<ul class="nav nav-tabs tabs-left">
<li class="active"><a data-toggle="tab" href="#home">Home</a></li>
<li><a data-toggle="tab" href="#menu1">Menu 1</a></li>
</ul>
</div>
<div class="col-md-9 tabs-left" style="background-color:white">
<div class="tab-content">
<div id="home" class="tab-pane fade in active">
<div class="panel-body fixed-panel">
<div class="row">
<div class="col-lg-3">
#Html.DropDownList("List", new SelectList(ViewBag.List, "ListID", "ListDescription"), "Select", new { id = "List1"})
</div>
Continue
</div>
</div>
</div>
<div id="menu1" class="tab-pane fade in active">
<div class="panel-body fixed-panel">
<div class="row">
<div class="col-lg-3">
#Html.DropDownList("List", new SelectList(ViewBag.List, "ListID", "ListDescription"), "Select", new { id = "List1"})
</div>
</div>
</div>
</div>
<div id="menu2" class="tab-pane fade in active">
<div class="panel-body fixed-panel">
<div class="row">
<div class="col-lg-3">
#Html.DropDownList("List", new SelectList(ViewBag.List, "ListID", "ListDescription"), "Select", new { id = "List1"})
</div>
</div>
</div>
</div>
</div>
</div>
"
Jquery To check for validation and close the tab and open the next tab:-
$('.nexttab').click(function (e) {
e.preventDefault();
var sectionValid = true;
section = $(this).closest('.tab-pane.fade');
$.each(section.find('input'), function () {
if (!$(this).valid()) {
sectionValid = false;
}
});
if (sectionValid) {
// collapse current section:
section.collapse('toggle');
// find and uncollapse next section:
section.next().find('.tab-pane.fade').collapse('toggle');
}
});
I have go to close the active tab by "section.collapse('toggle');" however not able to open the next on on clicking the next tab. Any help will be highly appreciated. I am still trying my hands at asp mvc,so i could have missed the obvious.
Try this. I cleaned up the tab markup a bit, wrapped it with a form (required by jquery validate) and used .tab() instead of .collapse().
See http://getbootstrap.com/javascript/#tabs for the relevant documentation.
$('.nexttab').click(function(e) {
e.preventDefault();
var sectionValid = true;
section = $(this).closest('.tab-pane.fade');
sectionValid = section.closest('form').valid();
if (sectionValid) {
// find and uncollapse next section:
$(".nav-tabs .active a").closest("li").next().find("a").tab("show");
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdn.jsdelivr.net/jquery.validation/1.15.0/jquery.validate.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<form>
<ul class="nav nav-tabs tabs-left">
<li class="active"><a data-toggle="tab" href="#home">Home</a>
</li>
<li><a data-toggle="tab" href="#menu1">Menu 1</a>
</li>
</ul>
<div class="tab-content">
<div id="home" class="tab-pane fade in active">
<div class="panel-body fixed-panel">
<div class="row">
<div class="col-lg-3">
</div>
Continue
</div>
</div>
</div>
<div id="menu1" class="tab-pane fade in active">
<div class="panel-body fixed-panel">
<div class="row">
<div class="col-lg-3">
</div>
</div>
</div>
</div>
<div id="menu2" class="tab-pane fade in active">
<div class="panel-body fixed-panel">
<div class="row">
<div class="col-lg-3">
</div>
</div>
</div>
</div>
</div>
</form>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
You should be using the .tab('show') instead of .collapse('toggle').

Unobtrusive ajax - View being fully replaced by partial view

I have searched multiple examples and have tried several things to get this to work properly. Currently I am trying to get a div to be replaced by using an Ajax.HtmlLink pointing to a PartialViewResult method.
I have tried
Checking network and javascript consoles to make sure my .js are all being loaded
Unbundling the stock jqueryval bundle and including the scripts manually
Double checked I didn't have another DOM element with the same update target Id
Checked my ajaxoptions to ensure everything was correct
I know unobtrusive is working because my Email duplicate remote validation check is working.
I will now show some screen shots of my debugging process
Here is what the page looks like prior to ajax load
My goal is to replace the container on the right that is currently holding email, name, and zipcode values
Here is the result##
This is what my view code looks like
<div class="container">
<br />
<br />
<div class="row">
<div class="col-sm-3">
<div class="sidebar-account">
<div class="row ">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">My Account</div>
<div class="panel-body">
<ul class="nav">
<li>
<a class="active" href="account_dashboard.html">Me</a>
</li>
<li>
#Ajax.ActionLink("Alerts", "ManageAlerts", null, new AjaxOptions
{
HttpMethod = "GET",
UpdateTargetId = "ajax-update",
InsertionMode = InsertionMode.Replace,
OnBegin = "ajaxBegin",
OnFailure = "ajaxFail",
OnComplete = "ajaxComplete",
OnSuccess = "ajaxSuccess"
}, new { #class = "active" })
</li>
<li>
<a class="active" href="account_account.html">Linked Accounts</a>
</li>
<li>
<a class="active" href="account_ads.html">Manage ads</a>
</li>
<li>
<a class="active" href="account_ad_create.html">Create new ad</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row hidden-xs">
<div class="col-lg-12">
<div class="well">
<div class="row ">
<div class="col-lg-3">
<img src="css/images/icons/Crest.png" width="45" />
</div>
<div class="col-lg-9">
<h4 style="margin-top: 0">Increase visibility</h4>
<p>Don't forget to 'bump' your listing to gain more visibility</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-9">
<div id="ajax-update">
#Html.Partial("_ManageUserAccount", Model)
</div>
</div>
<br />
</div>
Partial View Code##
<div id="fadein-div">
<div class="panel panel-default">
<div class="panel-heading">#Model.Username : Alerts</div>
<div class="panel-body">
<br />
<div class="row">
<div class="col-sm-12">
<p><span style="font-weight:bold">Change your alerts!</span></p>
</div>
</div>
<br />
#using (Html.BeginForm("ManageAlerts", "Account", FormMethod.Post, new { #class = "form-vertical", role = "form" }))
{
#Html.AntiForgeryToken()
<fieldset>
<div class="row">
<div class="col-sm-12 ">
<div class="form-group">
<div class="row">
<div class="col-sm-2">
<div class="checkbox">
#Html.CheckBoxFor(P => P.EmailAlertsOn) #Html.LabelFor(P => P.EmailAlertsOn)
</div>
</div>
</div>
</div>
<div id="control-div">
<div class="form-group">
<h3>Email alert options</h3>
</div>
<div class="form-group">
<div class="checkbox">
#Html.CheckBoxFor(P => P.EmailOnNewMessageOn) #Html.LabelFor(P => P.EmailOnNewMessageOn)
</div>
<div class="text-danger">
#Html.ValidationMessageFor(P => P.EmailOnNewMessageOn)
</div>
</div>
<div class="form-group">
<div class="checkbox">
#Html.CheckBoxFor(P => P.EmailOnReplyOn) #Html.LabelFor(P => P.EmailOnReplyOn)
</div>
<div class="text-danger">
#Html.ValidationMessageFor(P => P.EmailOnReplyOn)
</div>
</div>
<div class="form-group">
<div class="checkbox">
#Html.CheckBoxFor(P => P.EmailOnAccountUpdateOn) #Html.LabelFor(P => P.EmailOnAccountUpdateOn)
</div>
<div class="text-danger">
#Html.ValidationMessageFor(P => P.EmailOnAccountUpdateOn)
</div>
</div>
</div>
<br />
<button type="submit" class="btn btn-primary">Save details</button>
</div>
</div>
</fieldset>
}
</div>
</div>
And finally, controller code##
[HttpGet]
public PartialViewResult ManageAlerts()
{
var user = UserManager.FindById(Guid.Parse(User.Identity.GetUserId()));
Models.Account.ManageAlertsViewModel vm = new ManageAlertsViewModel();
vm.Username = user.UserName;
vm.EmailAlertsOn = user.EmailAlertsOn;
vm.EmailOnAccountUpdateOn = user.EmailOnAccountUpdateOn;
vm.EmailOnNewMessageOn = user.EmailOnNewMessageOn;
vm.EmailOnReplyOn = user.EmailOnReplyOn;
return PartialView("_ManageAlerts", vm);
}
<!-- js library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<script src="~/Themes/Authenticity%20Forms/Authenty/js/bootstrap.min.js"></script>
<script src="~/Themes/Authenticity%20Forms/Authenty/js/jquery.icheck.min.js"></script>
<script src="~/Themes/Authenticity%20Forms/Authenty/js/waypoints.min.js"></script>
<!-- authenty js -->
<script src="~/Themes/Authenticity%20Forms/Authenty/js/authenty.js"></script>
<!-- preview scripts -->
<script src="~/Themes/Authenticity%20Forms/Authenty/js/preview/jquery.malihu.PageScroll2id.js"></script>
<script src="~/Themes/Authenticity%20Forms/Authenty/js/preview/jquery.address-1.6.min.js"></script>
<script src="~/Themes/Authenticity%20Forms/Authenty/js/preview/scrollTo.min.js"></script>
<script src="~/Themes/Authenticity%20Forms/Authenty/js/preview/init.js"></script>
#Scripts.Render("~/bundles/jqueryval")

Resources