小编jde*_*lin的帖子

在iOS设备上设置原生html5日期和时间选择器的宽度

我正在使用我正在处理的网站的移动版本的type = date和type = time的原生日期和时间选择器.但输入字段不符合我的css.

桌面:

桌面

iOS设备: 在此输入图像描述

基本上我需要两个日期和时间输入来填充约50%的宽度.这是我正在使用的html和css:

<div class="arriveWrapper">
            <div class="arriveDateWrapper fieldWrapper">
                <input class="arriveDate" name="arriveDate" type="date" placeholder="What date?" />
            </div>
            <div class="arriveTimeWrapper fieldWrapper">
                <input class="arriveTime" name="arriveTime" type="time" placeholder="What time?" />
            </div>
            <div class="clear"></div>
        </div>


.arriveDateWrapper {
    width: 49%;
    margin-right: 2%;
    float: left;
    position: relative;
}

        .arriveDate {
            width: 100%;
            height: 28px;
            -moz-box-sizing: border-box;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
        }

.arriveTimeWrapper {
    width: 49%;
    float: left;
}

    .arriveTime {
        width: 100%;
        height: 28px;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
Run Code Online (Sandbox Code Playgroud)

如果有人能告诉我如何在使用原生日期/时间选择器时让占位符显示出来也很棒. …

css html5 mobile-safari css3 ios

21
推荐指数
2
解决办法
1万
查看次数

Phonegap:键盘在iOS 7中更改窗口高度

在iOS 6中一切正常.键盘打开并将输入移动到视图中.当键盘关闭时,一切都会回到应有的位置.

在iOS 7中,键盘打开正常,输入仍然在视图中.当键盘关闭时,应用程序的整个下半部分都消失了.我已经将问题跟踪到键盘打开时窗口高度的变化,并且在关闭时不会改变.

在键盘打开之前,窗口高度为568,根据$(window).height(),在打开后,它关闭后为828.文档的高度也相应改变.

我试图阻止窗口调整大小:

$(window).resize(function(e) {
   e.preventDefault();
   e.stopPropagation();
   window.resizeTo(320,480);
   return false;
});
Run Code Online (Sandbox Code Playgroud)

我还尝试在键盘关闭后设置尺寸,但没有成功.

我正在使用phonegap 2.7并将KeyboardShrinksView设置为true.

ios cordova ios7

12
推荐指数
2
解决办法
1万
查看次数

无法将javascript添加到富文本编辑器

我正在尝试在我的Umbraco设置中允许使用富文本编辑器输入中的javascript.我正在使用Umbraco 7.2.我在tinyMceConfig.config中启用了脚本标记,因此编辑器不再使用我的脚本标记.现在的问题是我的内容被切断了.

例如,在我的RTE中,我把:

<p>before</p>
<script>
alert('blam');
</script>
<p>after</p>
Run Code Online (Sandbox Code Playgroud)

这个由TinyMCE转换为:

<p>before</p>
<script>// <![CDATA[
alert('blam');
// ]]></script>
<p>after</p>
Run Code Online (Sandbox Code Playgroud)

问题是Umbraco.Field("myRte")的价值最终是:

<p>before</p>
<script>// <![CDATA[
alert('blam');
// ]]
Run Code Online (Sandbox Code Playgroud)

它似乎与CDATA有关.有没有其他人在Umbraco 7中使用RTE工作?

tinymce umbraco umbraco7

10
推荐指数
1
解决办法
3077
查看次数

MVC Child Action在Path中抛出非法字符

当我的视图包含子动作时,当我的url包含引号字符时,我收到一个意外的异常.

http://mysite.info/home/index/"

当此操作的视图不包含子操作时,一切正常.当它确实包含子动作(例如@ Html.Action("Menu"))时,我在调用Html.Action时得到异常"System.ArgumentException:path in Illegal characters".

看这篇文章,双引号字符不是默认的无效字符之一.在我看来,有或没有儿童行为的行为应该表现相同.双引号是有效还是不有效.

另外,我不确定如何最好地解决这个看似双重标准的问题.我犹豫是否要更改非法字符列表以包含"(默认值是默认值的原因).子操作非常有用所以我不想不使用它们.试着抓住每个孩子的动作是hacky .

我并没有积极尝试在我的路线中使用引号,但如果"不在非法字符列表中那么它不应该导致异常,对吧?

例

控制器:

public class HomeController : Controller
{
    public ActionResult WithChildAction() // throws exception with quote in path
    {
        return View();
    }

    public ActionResult WithoutChildAction() // works with quote in path
    {
        return View();
    }

    public ActionResult ChildAction()
    {
        return View();
    }
}
Run Code Online (Sandbox Code Playgroud)

WithChildAction.cshtml:

<h2>With Child Action</h2>

@Html.Action("ChildAction")
Run Code Online (Sandbox Code Playgroud)

WithoutChildAction.cshtml:

<h2>Without Child Action</h2>
Run Code Online (Sandbox Code Playgroud)

ChildAction.cshtml:

<h2>Child Action</h2>
Run Code Online (Sandbox Code Playgroud)

堆栈跟踪

[ArgumentException: Illegal characters in path.]
   System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) +11113918
   System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] …
Run Code Online (Sandbox Code Playgroud)

asp.net asp.net-mvc

6
推荐指数
1
解决办法
1704
查看次数

如何为Azure功能设置MaxReceivedMessageSize

我正在创建一个Azure函数,它将接收一个POSTed文件并对其进行处理.我有基础设置,我可以成功发布一个小文件.每当我发布一个大文件时,我都会收到以下错误消息.

A ScriptHost error has occurred
Exception while executing function: Functions.HttpTriggerCSharp. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'request'. System.ServiceModel: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
Exception while executing function: Functions.HttpTriggerCSharp
Executed: 'Functions.HttpTriggerCSharp' (Failed)
  Function had errors. See Azure …
Run Code Online (Sandbox Code Playgroud)

c# azure azure-functions

6
推荐指数
1
解决办法
1000
查看次数

PushSharp WithCustomItem无法发送

我有使用PushSharp的Android和Apple推送通知,但我在使用Apple通知发送自定义数据时遇到问题.

这完美地发送:

push.QueueNotification(new AppleNotification()
                                   .ForDeviceToken(device.Identifier)
                                   .WithAlert(message)
                                   .WithSound("default")
                                   .WithBadge(7));
Run Code Online (Sandbox Code Playgroud)

这根本不起作用:

push.QueueNotification(new AppleNotification()
                                   .ForDeviceToken(device.Identifier)
                                   .WithAlert(message)
                                   .WithSound("default")
                                   .WithCustomItem("incidentId", new[] { 1 })
                                   .WithBadge(7));
Run Code Online (Sandbox Code Playgroud)

后者永远不会遇到NotificationSent,NotificationFailed,ServiceException等,并且永远不会进入手机.

使用PushSharp版本2.0.4.0

我是否在尝试添加自定义数据时出错?

c# apple-push-notifications pushsharp

4
推荐指数
1
解决办法
3222
查看次数

应用程序关闭时未收到 Android 推送通知

我按照 PushSharp 存储库中的示例进行操作: PushSharp Android Client Sample

如果应用程序处于打开状态或在后台(通过点击主页或后退按钮),一切都运行良好。但是,如果我通过在应用程序管理器中将其滑动来关闭应用程序,我将不再收到通知。

我的假设是,由于 PushHandlerService 被标记为 [Service],即使应用程序关闭它也会保持打开状态并继续侦听通知。有没有办法在应用程序关闭的情况下继续接收通知,还是我做错了?

我会包含代码,但我所获得的内容几乎完全来自上述链接中的示例。

编辑:

我尝试在应用程序启动时触发 PushClient.Register,即使设备已经注册,希望如果它没有启动,这将启动 PushHandlerService。即使在每次启动应用程序时重新注册,当应用程序关闭时我仍然没有收到通知。

android push-notification xamarin.android xamarin pushsharp

2
推荐指数
1
解决办法
2817
查看次数